1 java - data type
TRANSCRIPT
Java – Data Type
Organized By: Vinay Arora
Assistant Professor
CSED, Thapar University
www.slideshare.net/aroravinay
Vinay AroraCSED
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 TypesReference/Object Data Types
Vinay AroraCSED
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 AroraCSED
Primitive Data Types (Conti…)
Vinay AroraCSED
Primitive Data Types (Conti…)
Vinay AroraCSED
Primitive Data Types (Conti…)
Vinay AroraCSED
Primitive Data Types (Conti…)
Vinay AroraCSED
Primitive Data Types (Conti…)
Vinay AroraCSED
Reference Data Type
Vinay AroraCSED
Java Literals
Vinay AroraCSED
Thnx…