internal is the default if no access modifier is specified. Struct members, including nested classes and structs, can be declared public , internal , or private . ... If allowed, it would have the effect of making A public, because all protected or internal members of A are accessible from the derived class.
Which is the default access specifier?
The default access modifier is also called package-private, which means that all members are visible within the same package but aren't accessible from other packages: package com.
What is a default access specifier with example?
Example of default access modifier
We are accessing the A class from outside its package, since A class is not public, so it cannot be accessed from outside the package. In the above example, the scope of class A and its method msg() is default so it cannot be accessed from outside the package.