Is Int
a primitive data type?
No—it is not on the list of primitive data types (the word that starts with
a small "i" is on the list: int
). Remember that Java
is case sensitive.
Java has very many data types built into it, and you (as a programmer) can create as many more as you want. However, all data in Java falls into one of two categories: primitive data and objects. There are only the eight primitive data types. Any data type you invent will be a type of object.
Much more will be said about objects future chapters (since Java is a object oriented programming language). The following is all you need to know, for now:
A (crude) analogy is that a primitive data value is like a nut or a bolt, but an object is like a whole machine. If you want to learn more about objects right away, it would not hurt to jump ahead to the Chapter On Objects and read a few pages.
Are numbers of fundamental importance to computer programs?