AF
HomeTagSubmit NotesAsk AnythingLoginSubscribe Us
AF
1. Feel Free to ask and submit anything on Anyforum.in and get satisfactory answer
2. Registration is not compulsory, you can directly login via google or facebook
3. Our Experts are looking for yours ?.



corejava-basics: Is Empty java file name a valid source file name ?

May i save a java file without any name ? as .java only. would it work properly ?

corejava x 353
basics x 171
Posted On : 2013-11-19 22:22:44.0
profile Rishi Kumar - anyforum.in Rishi Kumar
523188250048
up-rate
5
down-rate

Answers


Yes, you can save your java file by .java only, compile it by javac .java and run by java yourclassname
Let´s take a simple example:
//save by .java only  
 
class AnyForum{  
public static void main(String args[]){  
System.out.println("Hello anyforum.in");  
}  
}  
 
compile it by javac .java
run it by java AnyForum

Posted On : 2013-11-19 23:00:42
Satisfied : 2 Yes  0 No
profile Garima Gupta - anyforum.in Garima Gupta
596129560202
Reply This Thread
up-rate
5
down-rate



Post Answer
Please Login First to Post Answer: Login login with facebook - anyforum.in