Java Practice Test - 8

Time: 00:00:00
0
Attempted
25
Not Attempted
0
Marked For Review
0
Attempted & Reviewed

Question 1 of 25

What will be the output of the following program?

class Exc0 extends Exception { } 
class Exc1 extends Exc0 { } /* Line 2 */
public class Test 
{  
    public static void main(String args[]) 
    { 
        try 
        {  
            throw new Exc1(); /* Line 9 */
        } 
        catch (Exc0 e0) /* Line 11 */
        {
            System.out.println(Ex0 caught); 
        } 
        catch (Exception e) 
        {
            System.out.println(exception caught);  
        } 
    } 
}
Select Your Answer:

All Questions

Attempted
Not Attempted
Marked for Review
Attempted & Reviewed
Current