Multiple Choice Question

Quiz Guidelines

 

QID: 
535
Question: 

What will the following code print when run?

public class Test{ 
static String j = ""; 
public static void method( int i){ 
 try{   if(i == 2){     
throw new Exception();   }   
j += "1";  }  
catch (Exception e){  
 j += "2";   
return;  }  
finally{   
j += "3";  }  
j += "4"; } 
public static void main(String args[]){  
method(1);  
method(2);  
System.out.println(j); } }

Select 1 option 

A. 13432 
B. 13423
C. 14324 
D. 12434 
E. 12342 

Q&A Set: