-
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...");
}
}
}
-
- Newexception
- Execution
- Newexception working proper...
- Runtime Error
- None of these
Correct Option: C
Newexception is self defined exception.