What are the valid characters for a Java method name?

前端 未结 3 1735
广开言路
广开言路 2021-02-08 15:02

I read about the naming of Java variables. It says that Java variables cannot start with any numbers and special characters except for $ and _.

Some valid examples:

3条回答
  •  走了就别回头了
    2021-02-08 15:26

    From the Java Tutorial:

    "Although a method name can be any legal identifier, code conventions restrict method names." http://docs.oracle.com/javase/tutorial/java/javaOO/methods.html

提交回复
热议问题