Primitive Data Types 
There are eight primitive data types supported by Java. 
Primitive data types are predefined by the language and 
named by a key word. 
Primitive types are not objects; 
so does not have any methods for further processing.
Non Decimal 
● byte - signed 8-bit 
● short - signed 16-bit 
● int - signed 32-bit 
● long - signed 64-bit
Decimal 
● float - single-precision 32-bit 
● double - double-precision 64-bit
boolean 
● boolean data type represents one bit of information 
● There are only two possible values : true and false. 
● Default value is false
char 
● 16-bit Unicode character 
● Minimum value is ‘u0000′ (or 0). 
● Maximum value is ‘uffff’ (or 65,535 inclusive)
Reference Data Types 
Reference variables are created using defined 
constructors of the classes. 
They are used to access objects. These variables are 
declared to be of a specific type that cannot be changed.
Java Literals 
A literal is a source code representation of a fixed value.
Java language supports few special escape 
sequences for String and char literals as well.

Java basic-data-types

  • 1.
    Primitive Data Types There are eight primitive data types supported by Java. Primitive data types are predefined by the language and named by a key word. Primitive types are not objects; so does not have any methods for further processing.
  • 2.
    Non Decimal ●byte - signed 8-bit ● short - signed 16-bit ● int - signed 32-bit ● long - signed 64-bit
  • 3.
    Decimal ● float- single-precision 32-bit ● double - double-precision 64-bit
  • 4.
    boolean ● booleandata type represents one bit of information ● There are only two possible values : true and false. ● Default value is false
  • 5.
    char ● 16-bitUnicode character ● Minimum value is ‘u0000′ (or 0). ● Maximum value is ‘uffff’ (or 65,535 inclusive)
  • 6.
    Reference Data Types Reference variables are created using defined constructors of the classes. They are used to access objects. These variables are declared to be of a specific type that cannot be changed.
  • 7.
    Java Literals Aliteral is a source code representation of a fixed value.
  • 8.
    Java language supportsfew special escape sequences for String and char literals as well.