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: 793

Copyright © 2025. Powered by Intellect Software Ltd