O'Reilly logo

Programmer's Guide to Java™ Certification, A: A Comprehensive Primer, Second Edition by Rolf W. Rasmussen, Khalid A. Mughal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Review Questions

6.3 Which statements are true?

Select the two correct answers.

  1. A subclass must define all the methods from the superclass.

  2. It is possible for a subclass to define a method with the same name and parameters as a method defined by the superclass.

  3. It is possible for a subclass to define a field with the same name as a field defined by the superclass.

  4. It is possible for two classes to be the superclass of each other.

6.4 Given the following classes and declarations, which statements are true?
 // Classes class Foo { private int i; public void f() { /* ... */ } public void g() { /* ... */ } } class Bar extends Foo { public int j; public ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required