Which of the following members of base class are accessible to the derived class members?
Along with public and protected members even static members are also accessible depending on the access specifier.
Ex:Observer the sample code given below.
public class A1
public static int x;
public class A2:A1
public void M()
x = x + 1;
Back To Top