“+”连接符只能用在数字当中吗?在“HelloWord”中插入换行符\n,不需“+”连接符就可以运行成功,数字咋不能?

img


这是什么原因呢?什么原因呢?以下是为了凑数字,求原谅。

img


搞不明白。

字符串和数字需要理解清楚。

        String str1 = a + "\n" + b + "\n" + c;
        String str2 = "hello" + "\n" + "world";
        String str3 = "hello\nworld";

错误提示的是44行,代码不全吧,你全部粘贴出来

c前面少了个+ 号