Update 04-Operators.md

This commit is contained in:
LingCoder
2019-03-26 09:30:36 +08:00
committed by GitHub
parent 093fa2ac6a
commit c08b2a880f

View File

@@ -49,7 +49,7 @@ public class Precedence {
这些语句看起来大致相同,但从输出中我们可以看出它们具有非常不同的含义,具体取决于括号的使用。
我们注意到,在 `System.out.println() ` 语句中使用了`+`运算符。 但是在这里 `+`代表的意思是字符串连接符。编译器看到字符串的后面连着一个非`+`连接的非字符串,那么其将会试图去转换这个非字符串成为字符串。上例中的输出结果说明了 a 和 b 都已经被转化成了字符串。
我们注意到,在 `System.out.println()` 语句中使用了`+`运算符。 但是在这里 `+`代表的意思是字符串连接符。编译器会将`+`连接的非字符串尝试转换为字符串。上例中的输出结果说明了 a 和 b 都已经被转化成了字符串。
<!-- Assignment -->
@@ -113,4 +113,4 @@ public class Precedence {
<!-- 分页 -->
<div style="page-break-after: always;"></div>
<div style="page-break-after: always;"></div>