DEV Community

Jeya Lakshmi
Jeya Lakshmi

Posted on

Data Types:

Data type specify the type of data that can be stored inside the variable of java
primitive data type:
1)Boolean : true or false -1bit
2)char : A....etc -2byte
3)byte : 23 -1byte
4)int :-128 to 127 -8 byte
5)long : 16-byte
6)float : 8 byte
7)double : 16 byte
8)short : 1 byte

what is class?
class is a blue print and template use to create object
it serves fundamental of java blocking code
it doesnt take up memory
what is Java Objects?
A java object is a instance of a class
it contain states and behaviour

Top comments (0)