Does Java have a limit on the class name length?

后端 未结 4 1206
既然无缘
既然无缘 2020-12-05 22:57

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?

4条回答
  •  攒了一身酷
    2020-12-05 23:19

    With JDK 1.5, the practical limit for class names on Windows XP with 255 -- longer names gave errors in the file system. This was the full name (directory+package+class).

    I have not tried JDK 1.6 on Vista or windows 7, hopefully Sun fixed it to be the NTFS limit of 8000 or so.

提交回复
热议问题