Could anyone tell me why I get a compiler error here?
class NewInteger{
public static void main(String[] args){
Integer i = new Integer(200);
Integer j = ++i; //ok
Integer k = ++(new Integer(300)); //compile error: unexpected type
// required: variable
// found: value
}
}
Seems to me the offending line is just a terser version of the two preceeding it.