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

Copyright © 2024. Powered by Intellect Software Ltd