Java.Variable name length

后端 未结 4 1504
被撕碎了的回忆
被撕碎了的回忆 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 01:55

    The compiler has probably changed your really long name to something boring like "a".

    The variable name is there for the programmer's convenience. To the compiler and JVM it makes no difference if it's 1 character or 1 million as long as it's unique.

提交回复
热议问题