java标识符的命名规则(java标识符)

导读 大家好,我是小典,我来为大家解答以上问题。java标识符的命名规则,java标识符很多人还不知道,现在让我们一起来看看吧!1、标识符(Ident...

大家好,我是小典,我来为大家解答以上问题。java标识符的命名规则,java标识符很多人还不知道,现在让我们一起来看看吧!

1、标识符(Identifier):专门用于命名,还可用于类(Class)、方法(Method)等名称上。规则:(1)不可为关键字、符号,以免意义混淆;(2)第一个字符不可以是数字。(3)大小写代表不同意义。

2、关键字、保留字(Keyword):abstract assert boolean break byte case catch char class const continue default do double else enum extends false final finally float for goto if implements import instanceof int interface long native new null package private protected public return short static strictfp super switch synchronized this throw throws transient true try void volatile while

本文到此讲解完毕了,希望对大家有帮助。

最新文章