printing an int value right after a String value

前端 未结 9 1436
日久生厌
日久生厌 2021-01-27 06:00

I have the following example code:

int pay = 80;
int bonus = 65;
System.out.println(pay + bonus + \" \" + bonus + pay);

could someone please ex

9条回答
  •  -上瘾入骨i
    2021-01-27 06:34

    before " ",pay and bonus as integer, added result is 145. after " ",bonus and pay as String,result is "6580"

提交回复
热议问题