0
output of this
int i=22/7*100 Sysout(i+i+"hi"+i+i); output
3 Answers
+ 4
error
+ 3
If you modify your code to
int i = 22 / 7 * 100;
System.out.println(i + i + "hi" + i + i);
the output is 600hi300300.
Reason:
22 / 7 * 100 = 3 * 100 = 300.
Starts as an integer addition and gets to string concatenation.
600 + "hi" + 300 + 300 = "600" + "hi" + "300" + "300" = "600hi300300".
0
it look nice...