-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Learn Java with Projects
By :

Java provides eight in-built data types. In-built means that these data types come with the language. These primitive data types are the topic of this section.
All of the primitive data types are named using lowercase letters only; for example, int
and double
. When we create our own data types later on, namely classes, records, and interfaces, we will follow a different naming convention. For example, we may have a class named Person
or Cat
. This is simply a widely adopted coding convention and the compiler does not distinguish between naming conventions. However, it is very easy to recognize any of the primitive data types as they are always in lowercase letters only. Before we discuss the primitive data types themselves, there are a few important points to make.
In Java, all numeric primitive data types are represented as a series of bits. In addition...