This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
The throws clauses about Exceptions in the interface's methods must exactly match the throws clauses of the implementing methods. That means, we can't even declare the implemented methods as subclass of that Exception. Please confirm, I got it from a Note. Thanks in Advanced!~
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
In K&B's book, It's said that, A nonabstract implementing class must not declare any new checked exceptions for an implementation method. That means, We can't declare a subclass type Exception in the method declaration. Please confirm!
An implementation cannot throw new checked exceptions or broader checked exceptions. An implementation can as Neha demonstrated with her example throw a smaller exception (FileNotFoundException vs IOException). Of course can an implementation throw new RuntimeExceptions (lowercase T).
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.