What is the identifier length limit with Java?

John Zukowski

From a language specification perspective, there is no limit. From a class file perspective, there is a 64K byte limit to names. For ASCII identifiers, that would be 65535. For identifiers beyond the ASCII range, that could be considerably less, as they are stored in Unicode Transfer Format (UTF), taking up from 2-3 bytes / character.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.