!!!MOST UNBELIVEABLE!!!

Dear frns, examine the code below carefully and just tell wethet it will compile.

yes the code above will compile !!Zapped !!! YES A FULLY EMPTY FILE IS A VALID SOURCE FILE AND COMPILES WITHOUT ANY ERROR can any one give me a logical explanation? also A Java file without any class or interface definitions can also be compiled. AMIT

Amit, See whether you get any class file when you compile an empty file. You don't get any. That means there is nothing to compile. To answer your second part, in Java, everything has to be in a class. You can not have free standing methods or variables as in C. If you have some variable or method not inside any class, then compiler issues this error message: Class or interface declaration expected Ramesh.