Return-Type-Based Method Overloading in JavaAugust 1st, 2008 | by Jevgeni Kabanov | |
Return-Type-Based Method Overloading in Java — wow! Next you’ll discover that in Java bytecode you can throw/catch any object, not just Throwable subclasses and use that knowledge to implement more weird bytecode hacks! And BTW return-type overloading is used in Java 5 to implement bridge methods that allow overriding super methods with a different return type, so it’s not really so esoteric.