The
data type of a value (or variable in some contexts) is an attribute that tells
what kind of data that value can have. Most often the term is used in
connection with static typing of variables in programming languages like C/C++,
Java and C# etc, where the type of a variable is known at compile time. Data
types include the storage classifications like integers, floating point values,
strings, characters etc.
Data types define particular characteristics of data used in
software programs and inform the compilers about predefined attributes required
by specific variables or associated data objects.
There are two types
of data types in java. They are:
1)
Primitive datatypes
2)
Reference datatypes
The primitive data types are the predefined types that every
programming language contains. Java supports 8 primitive data types. Thay are
a)
byte
b)
short
c)
char
d)
int
e)
long
f)
float
g)
double
h)
Boolean
The Reference datatypes are nothing but user defined datatypes(class
types). These data types contains a reference which will hold the concerned
class objects. Every class is considered as a reference datatype.






0 comments:
Post a Comment