Computer programs manipulate data. That is the nature of computation. Thus, programming languages are designed to allow the programmer to conveniently describe such manipulations. Some types of data are so frequently used in programming that they are supported directly in most programming languages. Among these are numbers, characters (and sometimes sequences of characters, called strings), and logical truth-values (true and false, referred to as boolean values in honor of George Boole, who developed an algebra based upon them). For those types of data that are not directly supported, the programming language has structuring mechanisms via which a programmer is able to create new data types (using data of simpler types as components). In Java, the class is the structuring mechanism by which new data types are created.
In Java, there are two broad categories of data types: primitive types and object (or reference) types. The former are the types of data directly supported in the language and are the subject of this document. Object types are created using Java's class construct, as mentioned above and as we will see later in this course.
Here is a classification of Java's primitive data types;