go to previous page   go to home page   go to next page hear noise highlighting

Answer:

(Review:) In Java, a piece of data either is 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 used for a particular section of memory is its 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.

Every object in Java is an instance of a class. A class definition has to exist first before an object can be constructed. Programmers can use classes that come with Java, or define their own classes.


QUESTION 2:

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

Data TypePrimitiveClass
int
String
long
double
Random
boolean
Scanner


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