Because you are not required to capture the return value of a method in Java, in which case the compiler can not decide which overload to use. E.g.
boolean doSomething() { ... }
int doSomething() { ... }
doSomething(); // which one to call???
Because you are not required to capture the return value of a method in Java, in which case the compiler can not decide which overload to use. E.g.
boolean doSomething() { ... }
int doSomething() { ... }
doSomething(); // which one to call???