This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
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.