Review Questions

4.14 Given the following class, which of these are valid ways of referring to the class from outside of the package net.basemaster?
package net.basemaster;

public class Base {
    // ...
}

Select the two correct answers.

  1. By simply referring to the class as Base.

  2. By simply referring to the class as basemaster.Base.

  3. By simply referring to the class as net.basemaster.Base.

  4. By importing with net.basemaster.* and referring to the class as Base.

  5. By importing with net.* and referring to the class as basemaster.Base.

4.15 Which one of the following class definitions is a valid definition of a class that cannot be instantiated?

Select the one ...

Get Programmer's Guide to Java™ Certification, A: A Comprehensive Primer, Second Edition 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.