I have this piece of code, and error is generated, just because I haved added into a constructor for its class.
class NestedClass
{
class A
{
A() {}
}
class B
{
// no constructor
}
public static void run()
{
A a = new A(); // error
B b = new B(); // no error
}
}
And error is:
NestedExample.A is inaccessible due to protection level
Please help me explain this.
Thanks :)