Ambiguity in function overloading in java
<p>As return type does not play any role in function overloading,and compiler only check the unique existence of only those part of code which is used at calling time..</p>

<p>Then why not this code contain error</p>

<pre><code>class Temp{
  Temp(){
    System.out.println("Default Constructor");
  }
  void Temp(){
    S.o.p("HEll"); 
  }
  public static void main(String a[]){
    new Temp();
  }
}
</code></pre>

<p>Output=Default constructor...//
I am shocked there is NO COMPILE TIME ERROR as copiler only check only those part of code which is used at calling time ,means compiler need to check only unique existence of Temp() and there is no unique existence of Temp().</p>

<p>Kindly elaborate</p>
