0

Integer - Integers are whole numbers.
Data Type
Size
Default
Range
Example
byte
8 bits/ 1 byte
0
-128 to 127
10
short
16 bits / 2 byte
0
-32768 to 32767
500
Int
32 bits/ 4 byte
0
-2147483648 to 2147483647
10000
long
64 bits/ 8 byte
0
-9223372036854775808 to 9223372036854775807
256854857














Floating Point - A number containing a fractional part is called real number or floating point Number.
Data Types
Size
Default
Range
Example
float
32 bit / 4 byte
0.0
+/-1.4E-45 to +/-3.4028235E+38, +/-infinity, +/-0, NAN
25.254f
double
64 bit / 8 byte
0.0
+/-4.9E-324 to +/-1.7976931348623157E+308, +/-infinity, +/-0, NAN
256.21558










Character - A char is a single character that is a letter, a digit, a punctuation mark, a tab, a space or something similar. A char literal is a single one character enclosed in single quotes like
char word = ‘a’;
char symbol = ‘ ” ’;
Data Type
Size
Values
Default
Range
Example
Char
16 bits/  2 byte
Unicode character
\u0000
\u0000 to \uFFFF
‘ a ’
‘ 7 ’







Boolean - Booleans are logical variables, which can contain the value either true or false. Any other value cannot be assigned to a Boolean variable.
Data Type
Value
Default
Boolean
True (1), False (0)
False

Post a Comment

Comment Rules :
1. Do not post Adult/illegal Links.
2. Try to comment in only English Language.
3. Do not post other website's links which are useless.
4. Your Comment should be based on the Topic for other queries Kindly Visit our Contact Us Page.
5. Do not use Abusive Language.
6. Respect each other.
Thank You for following the rules. Please Comment....

 
Top