4 DataType
4 DataType
==========
Primitive
===========
Wrapperclass--------------classes of primitive datatype
byte 1 8 Byte 0
-128---to---127 ---2 digits 99
short 2 16 Short 0
32767 ---4 digits 9999
int 4 32 Integer 0
---9 digits 999999999
long 8 64 Long 0
9876543210l ---19digits 99999999999999L
String(predefinded class)---(java.lang-package)
-------------------------
"Collection of charater" "J a v a 2 0" Collections of characters within a
double quotes is called as String
a=100;
declaration
------------
datatype varaible Name;
eg:int age;
initilaization
--------------
variableName =value; (directly intilaization is not possible in java)
eg:age=22;
n--bit
Byte-->n=8
-2^[8-1] to (2^[8-1])-1
-2^7 to (2^7)-1
Short-->n=16
-------------
-2^[16-1] to (2^[16-1])-1
-2^15 to (2^15)-1