title: Java, impossible cast Object to Float.....why?
body: <p>Why this works:</p>
  
  <pre><code> Object prova = 9.2;
   System.out.println(prova);
   Double prova2 = (Double) prova;
   System.out.println(prova2);
  </code></pre>
  
  <p>And this doesn't?</p>
  
  <pre><code>Object prova = 9.2;
  System.out.println(prova);
  Float prova2 = (Float) prova;
  System.out.println(prova2);
  </code></pre>
  
  <p>I lost 1 hour in my java android application cause of this thing so i had to cast it in a double and than the double in a float or i had an exception</p>