revised: 01/17/00, 10/04/03, 02/12/06, 10/20/2012, 07/14/2017

quiz Quiz on Primitive Data quiz

Instructions: For each question, choose the single best answer. Make your choice by clicking on its button. You can change your answers at any time. When the quiz is graded, the correct answers will appear in the box after each question.

1. What is a data type?

A.    The part of the CPU that does arithmetic.

B.    A part of main memory used to store data.

C.    A particular scheme for representing values with bit patterns.

D.    The collection of variables that a program uses.

2. What is a Java primitive data type?

A.    A method for representing values that is so useful that it is a fundamental part of the language.

B.    A crude form of representing numbers.

C.    The part of Java that is the same as in older languages.

D.    A data type that cannot be used as part of an object.

3. Which of the following is NOT the name of a Java primitive data type?

A.    int

B.    float

C.    double

D.    String

4. Say that a particular item of data in a Java program does NOT use a primitive data type. What must it be?

A.    An object.

B.    A number.

C.    A literal.

D.    A boolean.

5. Can character data be stored in computer memory?

A.    No—computers can only store numbers.

B.    No—computer memory can only store patterns.

C.    Yes—characters are stored in special memory.

D.    Yes—a primitive data type is used to store characters.

The number you got right:       Percent Correct:       Letter Grade:   

Click here If you have returned here from another page, or have re-loaded this page, you will need to click again on each of your choices for the grading program to work correctly. You may want to press the SHIFT KEY while clicking to clear the old answers.