Java Reference
In-Depth Information
Quiz
Review today's material by taking this three-question quiz.
Questions
1. What is another word for a class?
a. Object
b. Template
c. Instance
2. When you create a subclass, what must you define about that class?
a. It already is defined.
b. Things that are different from its superclass.
c. Everything about the class.
3. What does an instance method of a class represent?
a. The attributes of that class
b. The behavior of that class
c. The behavior of an object created from that class
Answers
1. b. A class is an abstract template used to create objects similar to each other.
2. b. You define how the subclass is different from its superclass. The things that are
similar are already defined for you because of inheritance. Answer a. is technically
correct, but if everything in the subclass is identical to the superclass, there's no
reason to create the subclass at all.
3. c. Instance methods refer to a specific object's behavior. Class methods refer to the
behavior of all objects belonging to that class.
Certification Practice
The following question is the kind of thing you could expect to be asked on a Java pro-
gramming certification test. Answer it without looking at today's material.
 
Search WWH ::




Custom Search