Which statements are most accurate regarding the following classes? class A { private int i; protected int j; } class B extends A { private int k; protected int m; // some methods omitted }

Which statements are most accurate regarding the following classes?
class A {
  private int i;
  protected int j;
}
class B extends A {
  private int k;
  protected int m;
  // some methods omitted
}



A. In the class B, an instance method can only access i, j, k, m.
B. In the class B, an instance method can only access j, k, m.
C. In the class B, an instance method can only access j, m.
D. In the class B, an instance method can only access k, m.

The correct answer is B


Java

Learn More Multiple Choice Question :