Consider this code:
int x = 17;
int y = 013;
System.out.println(\"x+y = \" + x + y);
When I run this code I get the output 1711. Can anybod
You're doing string concatenation in the final print, since you're adding to a string. Since "x+y = " is a string, when you add x to it, it's giving you "17", making "x+y = 17".
THe 013 is in octal, so treated as a decimal, you get 11. When you concatenate this, you end up with "x+y = 17" + "11", or 1711