IntelliJ IDEA underlines variables when using += in JAVA

前端 未结 3 1875
遇见更好的自我
遇见更好的自我 2021-02-05 00:15

Since the new update (2018.2) IntelliJ IDEA underlines variables, when they are \"unnecessarily\" reassigned - this includes, however, each use of \"+=\".
Is this a mistake

3条回答
  •  -上瘾入骨i
    2021-02-05 00:49

    If you know what is the side effect in programming then it will be easy for you. To protect your variable from the side effect, the IDE shows the underline as a warning to you.

提交回复
热议问题