Question:Which is a proper way to declare and throw exception of class XYException?
A class XYException extends Exception {} ... throw new XYException();
B class XYException implements Exception {} ... throw new XYException();
C class XYException extends Exception {} ... throw new Exception(""XYException"");
D class XYException implements Exception {} ... throw new Exception(""XYException){};
+ AnswerA
+ Report