You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AutoboxingF.java 536B

12345678910111213141516
  1. public class AutoboxingF {
  2. public static void method_takes_Float(Float i) { System.err.println("method_takes_Float="+i);}
  3. public static void method_takes_float(float i) { System.err.println("method_takes_float="+i);}
  4. public static void main(String[] argv) {
  5. Float one = new Float(100.0f);
  6. float two = 200.0f;
  7. Float three = new Float(300.0f);
  8. float four = 400.0f;
  9. method_takes_Float(one);
  10. method_takes_Float(two);
  11. method_takes_float(three);
  12. method_takes_float(four);
  13. }
  14. }