Sunday, 24 April 2016

is source file name ".java" valid ?


Yes, absolutely !
We can define a source file without file name but using extension ".java"

File name : .java
class A{ 
   public static void main(String args[]){ 
      System.out.println("Hello java"); 
   }
}

Compile : javac .java
Run : java A

No comments:

Post a Comment

Note: only a member of this blog may post a comment.