1.

What is the output of this program?
class Newexception extends Exception 
{
int Execution;
Newexception(int p)
{
Execution = p;
}
public String toString()
{
return "Execution";
}
}

public class Output
{
static void compute (int p) throws Newexception
{
throw new Newexception(p);
}
public static void main(String args[])
{
try
{
compute(13);
}
catch(Exception e)
{
System.out.print("Newexception working proper...");
}
}
}

A. Newexception
B. Execution
C. Newexception working proper...
D. Runtime Error
E. None of these
Answer» D. Runtime Error


Discussion

No Comment Found

Related MCQs