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.

AutoboxingS.java 512B

12345678910111213141516
  1. public class AutoboxingS {
  2. public static void method_takes_Short(Short i) { System.err.println("method_takes_Short="+i);}
  3. public static void method_takes_short(short i) { System.err.println("method_takes_short="+i);}
  4. public static void main(String[] argv) {
  5. Short one = new Short("100");
  6. short two = 200;
  7. Short three = new Short("300");
  8. short four = 400;
  9. method_takes_Short(one);
  10. method_takes_Short(two);
  11. method_takes_short(three);
  12. method_takes_short(four);
  13. }
  14. }