Home » Oracle » 1z0-803 » Which two code fragments are valid?
Given:
Which two code fragments are valid?
A. Option A
B. Option B
C. Option C
D. Option D
E. Option E
Correct Answer: BC
Explanation/Reference:
When an abstract class is subclassed, the subclass usually provides implementations for all of the abstract methods in its parent class (C). However, if it does not, then the subclass must also be declared abstract (B).
Note: An abstract class is a class that is declared abstract – it may or may not include abstract methods. Abstract classes cannot be instantiated, but they can be subclassed.
Download Printable PDF. VALID exam to help you PASS.
|
|
B and D are correct.
Answer C is not correct because it produces this error:
The type Z must implement the inherited abstract method Y.methodY()