Multiple Choice
Look at the following code. Line 1 public class ClassA
Line 2 {
Line 3 public ClassA() {}
Line 4 public void method1() {}
Line 5 }
Line 6 public class ClassB extends ClassA
Line 7 {
Line 8 public ClassB() {}
Line 9 public void method1() {}
Line 10 }
Line 11 public class ClassC extends ClassB
Line 12 {
Line 13 public ClassC() {}
Line 14 public void method1() {}
Line 15 }
Which method1 will be executed as a result of the following statements?
ClassA item1 = new ClassC() ;
Item1.method1() ;
A) Line 4
B) Line 9
C) Line 14
D) This is an error and will cause the program to crash.
Correct Answer:

Verified
Correct Answer:
Verified
Q1: All methods in an abstract class must
Q36: If two methods have the same name
Q57: When declaring class data members it is
Q59: Look at the following code. Which line
Q60: What is wrong with the following code?<br>Public
Q62: Look at the following code. Which line
Q62: If a subclass constructor does not explicitly
Q63: When an interface variable references an object,
Q64: When a subclass extends a superclass, the
Q65: If a superclass does not have a