Variables with underline

后端 未结 6 1594
轮回少年
轮回少年 2020-12-28 12:23

I\'m getting an underline in some variables on Android Studio (in this case on the \'position\' variable). I think it\'s not an error because the application runs perfectly

6条回答
  •  感动是毒
    2020-12-28 13:15

    It may be because a immutable variable is subjected to modification. Like reassigning a String or trying to modify a final declared variable.

    String buffer = "";
    buffer = buffer + "new string";
    

    Will underline the buffer, since string are of immutable Objects.

提交回复
热议问题