字符串链接符拓展

时间:2021-09-02 06:42:43   收藏:0   阅读:8
package com.liu.operator;

public class Demo4 {
public static void main(String[] args) {
int a = 10;
int b = 20;
a+=b;// a=a+b
System.out.println(a);
//字符串链接符 String
//如果输出语句有字符串类型 字符串类型前面会运算,后面的不会运算会拼接
System.out.println(a+b+" "+a+b);
System.out.println(" "+a+b);

}
}

原文:https://www.cnblogs.com/sm12580/p/15207875.html

评论(0)
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!