Core Java Tutorial
Data Types in Java
Data types are used to identify what kind of values are stored in a variable. Data types are defined before the variable name.There are mainly two different data types are there.
1.Primitive Data Types 2.Non-Primitive Data types
Here int is data type of integer value 50 for the variable value.
Primitive data types
Primitive data types are predefined data types in java.There are mainly eigth primitive data types are there.see the below table of comparison between those eight data types
Non-Primitive Data Types
Examples for non-primitive data types are Strings,Arrays etc.. you will learn each one separately in next couple of minutes.