摘要: In the first case, the compiler knows that you're trying to unbox a compile-time constant of null. In the second case, the type of the conditional expression is Integer, so you're effectively writing: Integer tmp = new Random().nextBoolean() ? 1 : null;return (int) tmp; ... so the unboxing i 阅读全文
posted @ 2012-09-14 13:50 规格严格-功夫到家 阅读(246) 评论(0) 推荐(0)