go to previous page   go to home page   go to next page        


(Review:) In Java, a piece of data either is of a primitive data type or is an object data type.

Primitive Data Types and Classes

two types of data

Chapter eight discusses the idea of a data type:

Computer memory stores bit patterns. A particular pattern has meaning only when you know what type of value it represents, and what scheme is being used to represent values with patterns. The scheme that is being used for a particular section of memory is a data type.

If these ideas have gotten fuzzy, you may wish to review chapter eight.

Java has many data types built into it, and you (as a programmer) can define as many more as you need. Other than the primitive data types, all data types are classes. In other words, data is either primitive data or object data. The only type of data a programmer can define is an object data type (a class). Every object in Java is an instance of a class. The class definition has to exist first before an object can be constructed.


(Review:) In the table decide on the classification for each data type.

Data TypePrimitiveClass