Why is method overloading not possible by changing the return type in java?

In Java, method overloading is not possible by changing the return type of the program due to avoid the ambiguity.

  1. class Adder{
  2. static int add(int a,int b){return a+b;}
  3. static double add(int a,int b){return a+b;}
  4. }
  5. class TestOverloading3{
  6. public static void main(String[] args){
  7. System.out.println(Adder.add(11,11));//ambiguity
  8. }}

Output:

Compile Time Error: method add(int, int) is already defined in class Adder