Yes I do agree with u that PAckage declarations, Import statements & class defn is the order.
But if u do not define a class, i.e. you donot have methods in it & instance variables in it. Nothing is going to stop you.
Only issue is that of presence of public static void main(
String[] args).
I have never tried to compile a class without that statement. Most probably you would get ClassDefNotFound error.
Regards
Tushar Kansara
------------------