blob: 2830c1deb39710967dd0610236a386b3e29a2c96 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
public class AutoboxingB {
public static void method_takes_Byte(Byte i) { System.err.println("method_takes_Byte="+i);}
public static void method_takes_byte(byte i) { System.err.println("method_takes_byte="+i);}
public static void main(String[] argv) {
Byte one = new Byte("1");
byte two = '2';
Byte three = new Byte("3");
byte four = '4' ;
method_takes_Byte(one);
method_takes_Byte(two);
method_takes_byte(three);
method_takes_byte(four);
}
}
|