Java / Object, Class and Package
Could a Java class file exists even without filename and only extension(.java)?
Yes. The file is to be saved as .java without any file name.
compile using javac .java and run using java <className>
For e.g., .java file content:
class JavaClass { public static void main(String args[]) { System.out.println(".java file content"); } }
More Related questions...