Skip to content

Commit

Permalink
[hotfix] fix a typo
Browse files Browse the repository at this point in the history
  • Loading branch information
yngwiewang authored Aug 2, 2019
1 parent bc0d11b commit 577fce5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/book/04-Operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,7 @@ public class AllOps {
}
```

**注意****boolean** 类型的的运算是受限的。你能为其赋值 `true``false`,也可测试它的值是否是 `true``false`。但你不能对其作加减等其他运算。
**注意****boolean** 类型的运算是受限的。你能为其赋值 `true``false`,也可测试它的值是否是 `true``false`。但你不能对其作加减等其他运算。

**char****byte****short** 类型中,我们可以看到算术运算符的“类型转换”效果。我们必须要显式强制类型转换才能将结果重新赋值为原始类型。对于 **int** 类型的运算则不用转换,因为默认就是 **int** 型。虽然我们不用再停下来思考这一切是否安全,但是两个大的 int 型整数相乘时,结果有可能超出 **int** 型的范围,这种情况下结果会发生溢出。下面的代码示例:

Expand Down

0 comments on commit 577fce5

Please sign in to comment.