Data Types

In Java, data type defines a set of values for real numbers, decimal numbers, alphabets, etc. Data types are classified into two types: primitive and non-primitive. The data types that are independent on any other type are known as primitive data types.

In Java, primitive data types are also known as basic or fundamental data types. Some of the primitive data types are int, float, char and boolean. Integers are the whole numbers with a range of values and the range of values are machine dependent. Float data type is used to store fractional numbers. Character type variable can hold a single character. Boolean data type represents the concept of true/false.

In Java, non-primitive data types are created from the basic or fundamental data types. Array, class and interface are the examples of non-primitive data types. Array is a data structure consisting of a group of elements that are accessed by indexing. A class is a group of objects that share common properties and relationships. Object is an entity created according to its class description.

To Access the full content, Please Purchase