System.out.println("5" + null);
System.out.println(5 + null);
I get 5null for both the statements.
I cannot even compile when I use *, /, % or - operators in the second statement.
I understand that when one of the operands is a String in a binary + expression, the other operand is made a String object and a String concatenation happens.
But with null...!!! Please explain
[ July 22, 2002: Message edited by: Madan, Gopal ]
System.out.println(5 + null);
I get 5null for both the statements.
I cannot even compile when I use *, /, % or - operators in the second statement.
I understand that when one of the operands is a String in a binary + expression, the other operand is made a String object and a String concatenation happens.
But with null...!!! Please explain
[ July 22, 2002: Message edited by: Madan, Gopal ]