Suppose the exception class CrazyException is defined as follows: public class CrazyException extends Exception { public CrazyException() { super("Crazy exception thrown!"); ...



Suppose the exception class CrazyException is defined as follows:


public class CrazyException extends Exception


{



public CrazyException()



{



super("Crazy exception thrown!");



System.out.println("Wow, Crazy exception thrown!");



}



public CrazyException(String message)



{



super(message);



System.out.println("Wow, crazy exception thrown with "+



"an argument!");



}



public void crazyMethod()



{



System.out.println("Message is " + getMessage());



}


}


What output would be produced by the following unlikely code?


CrazyException exceptionObject = new CrazyException();


System.out.println(exceptionObject.getMessage());


exceptionObject.crazyMethod();



May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here