
3.19 Exercises, Problems, and Projects
3.19.1 Multiple Choice Exercises
1. If you want to use an existing class from the Java class library in your
program, what keyword should you use?
❑
use
❑ import
❑ export
❑ include
2. A constructor has the same name as the class name.
❑ true
❑ false
3. A given class can have more than one constructor.
❑ true
❑ false
4. What is the keyword used to instantiate an object in Java?
❑
make
❑ construct
❑ new
❑ static
5. In a given class named Quiz, there can be only one method with the
name Quiz.
❑ true
❑ false
6. A static method is
❑ a class method
❑ an instance method
7. In the Quiz class, the foo method has the following API:
public static ...