Community
Participate
Working Groups
class L{ String g= "f" + + + System.currentTimeMillis(); }; this compiles but this fails: class L{ String g= "f" + + + new Long(System.currentTimeMillis()); };
Actually, the first is ugly but correct code. int i = + + + 10; <==> int i = + (+ (+ 10)); Therefore the first statement in your testcase is actually ok, since the operand of the unary '+' operator must be numeric.