title: Why this code convert value to double instead to float?
body: <p>I got a question. Why this code prints YYZ10.0 instead of printing XXZ10.0?
  The first constructor is A(int), then inside statement it returns false, so 9+1f should jump into A(float) constructor but instead it is going to A(double).</p>
  <pre><code>public class Main {
      public static void main(String[] args) {
          System.out.print(new A(011).fun()[1]);
      }
  }
  
  class A{
      double value;
      public A(int value){
          this(value &gt;&gt; 2 == 1 ? value+1.0 : value+1f);
      }
      public A(float value){
          System.out.print(&quot;XX&quot;);
          this.value = value;
      }
      public A(double value){
          System.out.print(&quot;YY&quot;);
          this.value = value;
      }
      public Object[] fun(){
          return new Object[]{new Object(), this};
      }
      public String toString(){
          return &quot;Z&quot;+value;
      }
  }
  </code></pre>