Java Data Types
There are two types of datatypes :-
2) Non-Primitive Datatypes
1) Primitive Data Types :
- 1) byte 2) short
- 3) int 4) long
- 5) char 6) float
- 7) double 8) boolean
- The primitive types are also commonly referred to as simple types.
- These can be put in four groups :-
1) Integer
2) Floating Point numbers
3) Character
4) Boolean
Integer :
- Java provides four integer types : byte , short , int , long.
- All of these are signed , positive and negative values.
Floating Point Types :
- There are two kinds of floating-point types :-
float
double
- Which represent single and double-point numbers respectively.
Character :
Boolean :
- Java has primitive type called boolean ,for logical values.
- It can have only one of two possible values , true or false.



Comments
Post a Comment