Search code examples
javaname-length

Does Java have a limit on the class name length?


This question came up in Spring class, which has some rather long class names. Is there a limit in the language for class name lengths?


Solution

  • The Java Language Specification states that identifiers are unlimited in length.

    In practice though, the filesystem will limit the length of the resulting file name.