Related questions

0 votes
0 answers
0 votes
0 answers
0 votes
0 answers
asked Jul 29 in java by vidya (500 points)
0 votes
0 answers
0 votes
0 answers

Is Empty .java file name a valid source file name?

0 votes

Yes, save your java file by .java only, compile it by javac .java and run by java yourclassname Let's take a simple example:

  1. //save by .java only  
  2. class A{  
  3. public static void main(String args[]){  
  4. System.out.println("Hello java");  
  5. }  
  6. }  
  7. //compile by javac .java  
  8. //run by     java A  

compile it by javac .java

run it by java A

asked Jul 10 in java by anonymous

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
...