Multiple choice technology programming languages

Select 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.

Reveal answer Fill a bubble to check yourself
B,C Correct answer
Explanation

B describes method overriding, which is legal in Java. C describes field hiding, also legal. A is false - abstract methods need implementation, but concrete methods can be inherited. D is false - circular inheritance creates a paradox and Java prohibits it.