M
mluebeck
Hi everyone,
I'm trying to do widening and then boxing, but it's impossible. Can
anyone tell me the reason?
Why is that behaviour useful?
class WB {
static void go(Integer x) { System.out.println("Integer"); }
public static void main(String [] args) {
short s = 5;
go(s); // must widen then box - illegal. But why??
}
}
thanks for your answers!
Mario
I'm trying to do widening and then boxing, but it's impossible. Can
anyone tell me the reason?
Why is that behaviour useful?
class WB {
static void go(Integer x) { System.out.println("Integer"); }
public static void main(String [] args) {
short s = 5;
go(s); // must widen then box - illegal. But why??
}
}
thanks for your answers!
Mario