A
Q. Determine output of the following program code?
public class Test{
public static void main(String args[]){
int i;
try{
i = calculate();
System.out.println(i);
}catch(Exception e){
System.out.println("Error occured");
}
}
static int calculate(){
return (7/2);
}
}
- Correct Answer - Option(A)
- Views: 8
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.