+ 1
Can anyone explain this to me
int x = 1 int y = 2 string s = "+x+y+(x+y); system.out.println(s);
1 Answer
+ 1
123
() first and from left to right with type casting
s = "" + 1 + 2 + (1+2)
s = "" + 1 + 2 + 3
s = "1" + 2 + 3
s = "12" + 3
s = "123"