Regarding question about 'main.class'
Posted: Wed Apr 02, 2014 5:45 pm
Hi Admin,
For the below question, please let me know why option 2 is wrong as I'm able to compile it without error:
The options below contain the complete contents of a file (the name of the file is not specified). Which of these options can be run with the following command line once compiled?
java main
Option 2 is :
//in file main.java
public static void main4(String[] args) {
System.out.println("hello"); }
Thanks,Yogesh.
For the below question, please let me know why option 2 is wrong as I'm able to compile it without error:
The options below contain the complete contents of a file (the name of the file is not specified). Which of these options can be run with the following command line once compiled?
java main
Option 2 is :
//in file main.java
public static void main4(String[] args) {
System.out.println("hello"); }
Thanks,Yogesh.