6.  Which exception is thrown when an array element is accessed beyond the array size ?


ArrayElementOutOfBounds
ArrayIndexOutOfBoundsException
ArrayIndexOutOfBounds
None of these


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

7.  What is the output of the following program code ?
public class Test{
public static void main(String args[]){
try{
int i;
return;
}
catch(Exception e){
System.out.print(‘’inCatchBlock’’);
}
finally{
System.out.println(‘’inFinallyBlock’’);
}
}
}


inCatchBlock
inCatchBlockinFinallyBlock
inFinallyBlock
The program will return without printing anything


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

8.  The exception class is in __________ package


java.file
java.io
java.lang
java.util


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

9.  Which keywords is used to monitor statement for exception ?


try
catch
throw
throws


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

10.  If an exception is generated in try block. then it is caught in


finally
throw
throws
catch


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report