Say I have a package higherachy like this net.xpack.ypack.zpack.abc here abc is a "abc.class" file. I want to use it in my current class. so I import it as import net.xpack.ypack.*; when I access it with zpack.abc.input();//here input is a public method under abc There is an error? please help me to solve this.
Although it looks as though zpack is "inside" ypack, as far as Java is concerned they're two separate unrelated packages. importing the classes in ypack doesn't tell the compiler to look in zpack, too.