Object Oriented Programming (OOPs)
© examsiri.com
Question : 11 of 72
Marks:
+1,
-0
Given:
Which statement is true?
1. class ClassA {
2.   public int numberOfInstances;
3.   protected ClassA(int numberOfInstances) {
4.    this.numberOfInstances = numberOfInstances;
5.   }
6. }
7. public class ExtendedA extends ClassA {
8.   private ExtendedA(int numberOfInstances) {
9.    super(numberOfInstances);
10.   }
11.   public static void main(String[] args) {
12.    ExtendedA ext = new ExtendedA(420);
13.    System.out.print(ext.numberOfInstances);
14.   }
15. }Which statement is true?
Go to Question: