public class Demo04 {
public static void main(String[] args) {
int a = 10;
int b = 20;
//字符串连接符 +
System.out.println(""+a+b);//加号前面有字符串 则结果为字符串
System.out.println(a+b+"");//加号后面有字符串 则结果正常运算
}
}
原创文章,作者:3628473679,如若转载,请注明出处:https://blog.ytso.com/268333.html