I have the following example code:
int pay = 80;
int bonus = 65;
System.out.println(pay + bonus + \" \" + bonus + pay);
could someone please ex
First it adds the two variables and at last it concatinates as string because the integers are converted into strings
For concatenation, imagine a and b are integers:
"" + a + b
This works because the + operator is overloaded if either operand is a String. It then converts the other operand to a string (if needed) and results in a new concatenated string. You could also invoke Integer.toString(a) + Integer.toString(b)
for concatenation