Quiz
To determine what kind of knowledge you inherited from the past hour's work, answer the following questions.
Questions
1: | If a superclass handles a method in a way you don't want to use in the subclass, what can you do?
|
2: | What methods can be used to retrieve an element stored in a vector?
|
3: | What statement can you use to refer to the methods and variables of the current object?
|
Answers
A1: | b. Because you can override the method, you don't have to change any aspect of the superclass or the way it works. |
A2: | a. The get() method has ... |
Get SAMS Teach Yourself Programming with Java™ in 24 Hours, FOURTH 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.