Which of the following deductions can be made from the code snippet given below?
class A { { System.out.println(1); } } class B extends A { { System.out.println(2); } } class C extends B { { System.out.println(3); } } class D extends B { { System.out.println(4); } }
Options
- Class A is the only child of class C because it comes after class B and therefore overrides it
- Class B is a child for two different classes
- Class B is a parent to both classes C and D
- Class C is only a parent to class B
- Class D is a child of class A because it is underneath it