Max name length of variable or method in Java

前端 未结 3 1927
春和景丽
春和景丽 2020-12-05 22:48

Is there a max length for class/method/variable names in Java? the JLS doesn\'t seem to mention that. I know very long names are problematic anyway from code readability and

3条回答
  •  情书的邮戳
    2020-12-05 23:20

    Sorry, actually found the answer in the JLS: http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#40625 It seems that identifier names are of unlimited length.

    Also found similar question (though it didn't appear in my initial search, or when I typed the question title which is weird): Maximum Method Name Length

提交回复
热议问题