Datatypes :
There are 8 datatypes in java :
Datatype
|
Value ( MIN & MAX )
|
Size
|
Default Value
|
|
1)
|
Byte
|
-128 to127
|
8 bits
|
0
|
2)
|
Short
|
-32,768 to 32,767
|
16 bits
|
0
|
3)
|
Int
|
- 2,147,483,648 to
2,147,483,647
|
32 bits
|
0
|
4)
|
Long
|
-
9,223,372,036,854,775,808 to
9,223,372,036,854,775,807
|
64 bits
|
0
|
5)
|
Float
|
Single precision
|
32 bits
|
0.0
|
6)
|
Double
|
Double Precision
|
64 bits
|
0.0
|
7)
|
Char
|
NA
|
16 bits
|
NULL
|
8)
|
Boolean
|
NA
|
1 bit
|
FALSE
|
Modifiers :
There are 12 Access Modifiers :
Access Modifiers
|
Access Modifiers
|
||
1)
|
Public
|
7)
|
Static
|
2)
|
Private
|
8)
|
Synchronized
|
3)
|
Default
|
9)
|
Native
|
4)
|
Protected
|
10)
|
Strict fp
|
5)
|
Final
|
11)
|
Transient
|
6)
|
Abstract
|
12)
|
Volatile
|
MODIFIER ACCESS :
Same Class
|
Same Package
|
Sub Class
|
Sub Package
|
|
Public
|
Y
|
Y
|
Y
|
Y
|
Protected
|
Y
|
Y
|
Y
|
X
|
Default
|
Y
|
Y
|
X
|
X
|
Private
|
Y
|
X
|
X
|
X
|
No comments:
Post a Comment