Self-Review Exercises

3.1

Fill in the blanks in each of the following:

  1. Each class declaration that begins with keyword            must be stored in a file that has exactly the same name as the class and ends with the .java file-name extension.

  2. Keyword            in a class declaration is followed immediately by the class’s name.

  3. Keyword            requests memory from the system to store an object, then calls the corresponding class’s constructor to initialize the object.

  4. Each parameter must specify both a(n)            and a(n)           .

  5. By default, classes that are compiled in the same directory are considered to be in the same package, known as the           .

  6. When each object of a class maintains its own copy ...

Get Java How to Program (early objects), 9/e now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.