Data Types in Java
Most modern programming languages, Java included, reuse a small set of the same primitive data types as their ancestors. These usually include integer and real numbers, characters, and a type representing true or false (boolean). Unlike other languages Java also defines the object as one of its primitve data types. In Java, all objects are said to be of the same data type. We distinguish from different types of objects by referring to the classes that define them. For example, we may refer to an object of the class String. Below are some examples of data types in Java along with an example of their literal type next to it. As you can see byte and short have no literal types in Java.
boolean(true or false)
double(89.5)
char('c') int(89, -90)
float(89.5) long(89L)
string("this is a string")
byte - no literal type
short - no literal type