Java.Variable name length

后端 未结 4 1470
被撕碎了的回忆
被撕碎了的回忆 2021-01-28 01:11

in documentation i read, that:

A variables name can be any legal identifier — an **unlimited-length** sequence of Unicode letters and digits

so

4条回答
  •  余生分开走
    2021-01-28 02:05

    iiiiiii.. is a local variable, i.e. it cannot be accessed from other classes. Therefore, its name does not matter; the compiler does not need to store it. Additionally, the compiler may look at your code and determine that {int i = 10;} is not actually doing anything and can be replaced by {} since both versions produce the same program output (none).

提交回复
热议问题