014_运算符_字符串连接

一、字符串相连:加号两边只要有一个为字符串,则变为字符串连接符、整个结果为字符串!

二、程序示例测试代码:  

/**
 * [说明]:测试字符串连接
 * 
 * @author aeon
 */
public class TestWhile {
    public static void main(String[] args) {
        System.out.println(4+"5");
    }
}

测试结果截图:

  

猜你喜欢

转载自www.cnblogs.com/aeon/p/9823164.html