In my book they say that its illegal tho have the same package and class name ??? I just tried it, and it compiled and worked fine ! Why this statement in my book ???
Which version of the JDK / which compiler are you using? I remember for a while this rule wasn't enforced, but I think it is now by newer compilers/jdks....
what book of yours? I try it, and it works well. here is the test code: package Test; public class Test { public static void main(String[] args) { System.out.println("Test OK!"); } } on jdk1.4.
I use jdk 1.2 and it works also here !!! I use the book "Complete Java 2 Certification study guide" from Simon Roberts Phillip Heller and Michael Ernest !
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.