Consider the following class:
public class Main{ public static void main (String args){ for (int i=0; i<3; i++){ System.out.print (args+" "); } } }
What will be printed when the above class is run using the following command line:
java Main 1 2 3 4
Select 1 option
Correct Option is : E
To run a class from the command line, you need a main (String [] ) method that takes an array of Strings array not just a String.
Therefore, an exception will be thrown at runtime saying no main (String [] ) method found.