0

output of this

int i=22/7*100 Sysout(i+i+"hi"+i+i); output

7th Apr 2017, 6:22 AM
Swapnil Bahadure
Swapnil Bahadure - avatar
3 Answers
+ 4
error
7th Apr 2017, 10:24 AM
Meharban Singh
Meharban Singh - avatar
+ 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".
7th Apr 2017, 2:07 PM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
0
it look nice...
29th Apr 2017, 10:11 AM
Swapnil Bahadure
Swapnil Bahadure - avatar