Data Types :-
In Java, every variable and every expression have some type.
Each and every data type is clearly defined.
Each and every data type is clearly defined.
Every assignment should check by the compiler for Type compatibility.
Now because of above reasons we can conclude that java is strongly typed language.
1. byte
size = 1 byte(8 bits)
MAX_VALUE = 127
MIN_VALUE = -128
Range = -128 to 127
size = 2 byte(16 bits)
MAX_VALUE = 32767
MIN_VALUE = -32768
Range = -2pow15 to +2pow15-13. int
size = 4 byte(32bits)
MAX_VALUE = 2147483647
MIN_VALUE = -2147483648
Range = -2pow31 to +2pow31-14. long
size = 8 byte(64bits)
Range = -2pow63 to +2pow63-15 .float
size= 4 byte(32bits)
Range= -3.4e38 to 3.4e38
or
-3.4*10pow38 to +3.4*10pow38
6. double
size= 8 byte(64bits)
Range= -1.7e308 to 1.7e308
or
-1.7*10pow308 to +1.7*10pow308
7.char
size= 2 byte(16bits)
Range= 0 to 65535
8 . boolean
values= true ,false
size =not applicable
Range =not applicable
Next:Chapter - 4 /Language Fundamental /Arrays /Array Declaration(Part-1)
Home:
No comments:
Post a Comment
Be the first to comment!
Don't just read and walk away, Your Feedback Is Always Appreciated. I will try to reply to your queries as soon as time allows.
Note:
1. If your question is unrelated to this article, please use our Facebook Page.
2. Please always make use of your name in the comment box instead of anonymous so that i can respond to you through your name and don't make use of Names such as "Admin" or "ADMIN" if you want your Comment to be published.
Regards,
JavaByChetan
Back To Home