Java Data types and variables

Java Data types and variables

The variables are information stored in the memory areas of internal memory system.
A variable name can not start with a number, can not contain special characters and reserved keywords.

Java variables are:

  • Primitive Data Types
  • Arrays

Primitive Data Types

Primitive data types that can be use in Java are:

  • int
  • float
  • short
  • long
  • double
  • char
  • byte
  • boolean


An array is a collection of variables of the same data type.

Data types and variables are:

Variables members(Instance variables)
Parameters methods
Local variables