Tuesday, October 27, 2015

Core Java - If a method throws NullPointerException in super class, can we override it with a method which throws RuntimeException?



One more tricky Java questions from overloading and overriding concept. Answer is you can very well throw super class of RuntimeException in overridden method but you can not do same if its checked Exception.

No comments:

Post a Comment