Java – Does Java have a limit on the class name length

javaname-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?

Best Answer

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.