Java – Data Type
Organized By: Vinay Arora
Assistant Professor
CSED, Thapar University
www.slideshare.net/aroravinay
Vinay Arora
CSED
Data type/s for the variable/s
īŦ Variables are nothing but reserved memory locations to store
values.
īŦ This means that when you create a variable you reserve some
space in memory.
īŦ Based on the data type of a variable, the operating system
allocates memory and decides what can be stored in the
reserved memory.
īŦ There are two data types available in Java:
Primitive Data Types
Reference/Object Data Types
Vinay Arora
CSED
Primitive Data Types
īŦ There are eight primitive data types supported by Java. Primitive
data types are predefined by the language and named by a
keyword.
īŦ Byte
īŦ Short
īŦ Int
īŦ Long
īŦ Float
īŦ Double
īŦ Boolean
īŦ Char
Vinay Arora
CSED
Primitive Data Types (Contiâ€Ļ)
Vinay Arora
CSED
Primitive Data Types (Contiâ€Ļ)
Vinay Arora
CSED
Primitive Data Types (Contiâ€Ļ)
Vinay Arora
CSED
Primitive Data Types (Contiâ€Ļ)
Vinay Arora
CSED
Primitive Data Types (Contiâ€Ļ)
Vinay Arora
CSED
Reference Data Type
Vinay Arora
CSED
Java Literals
Vinay Arora
CSED
Thnxâ€Ļ

1 java - data type