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){}; 

+ Answer
+ Report
Total Preview: 893

Copyright © 2026. Powered by Intellect Software Ltd