I know that members of a default access control class may be available at the package level, but I'm confused about what access to the package level actually means. If access to the default elements can be obtained at the package level, then I should not be visible in the Test2 class in the following example? class 1 -
package pkg1; public class Test { int i=0; }
class 2 -
import pkg1.Test; public class Test2 { void get(){ Test t = new Test(); ti=0; } }
Please help me get this concept. Thanks in advance.
aaaaa source share