Sunday, June 22, 2014

Data Types

Java is strongly typed language. This means that every variable must have a declared type. There are two kinds of data types in java: -
  • Primitive Data Types

  • Non-Primitive/reference Type


Primitive Type:-Primitive data type are the data type that are built into the java language. There are eight primitive data types in java programming language, which can be considered in four categories: -
  • Logical – boolean
  • Textual – char
  • Integral – byte, short, int and long
  • Floating Point – double and float

Non-Primitive Type: -Non-Primitive data type are based on Primitive data type and have more functionality that the primitive data type. For ex: - String, Array etc.

No comments:

Post a Comment