Java features explained with examples

Posts tagged core-java

Overloading by return type

It is known that one of the limitations of Java is the inability to overload a method by return type as the return type is not part of the signature of the method. According to https://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html#jls-8.4.2, “Two methods or constructors, M and N, have the same signature if they have the same name, the same […]