Multiple Choice Question

Quiz Guidelines



Consider the following class :

public class Parser{   
public static void main( String[] args){       
 int i = 0;           
i =  Integer.parseInt( args[0] );       }       
catch(NumberFormatException e){        
  System.out.println("Problem in " + i );       
}   } } 

What will happen if it is run with the following command line: java Parser one

Select 1 option 

A. It will print Problem in 0 
B. It will throw an exception and end without printing anything. 
C. It will not even compile. 
D. It will not print anything if the argument is '1' instead of 'one'. 
E. None of the above.

Q&A Set: