Which two are true about the lines labeled A through D?
A.
The code compiles and runs as is.
B.
If only line A is removed, the code will compile and run.
C.
If only line B is removed, the code will compile and run.
D.
If only line D is removed, the code will compile and run.
E.
Line C is optional to allow the code to compile and run.
F.
Line C is mandatory to allow the code to compile andrun.
Explanation:
A: The code will compile. The abstract method doDock() is implemented fine, and doFloat()
isoverridden.
E: Line C overrides the implementation of doFloat(). This is optional.
C E. The abstract class Boat cannot be newed.
+1
C E are the answer
C E
class Boat can not be instantiated