This content has been marked as final. Show 4 replies
+@According to the grammar the only things that can come before 'package' are Annotations.+
Yes, that's true.
Running (javac -version) gives me javac 1.5.0_16
However, I think I messed up here a bit. I saw this behaviour on eclipse IDE and didn't thought of testing it on commandline because when I tried it from command line I got the same error as reported by jschell :
C:\>"c:\Program Files\Java\*jdk1.5.0_16*\bin\javac.exe" B.java
B.java:1: 'class' or 'interface' expected
private package somepackage;
May be it's the eclipse (or some setting in it) which is supressing this error thrown by compiler.
Sorry for the trouble guys and thanks for your time/replies.
Edited by: sactiw on Jun 2, 2010 2:07 AM