Which of the following statements is true about given code?
public class Palle
private class A
public int y=90;
protected class B : A
public static void Main()
Palle.B b = new Palle.B();
Class A should be internal or protected
Class A should be Public or protected
The code will be compiled successfully and will get 90 as output
Class A should be Protected
Always base class should have more accessability than the derived class . So here base class A should not be private. It should be protected.
Back To Top