日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > java >内容正文

java

Identifiers in Java(Java标识符)

發布時間:2023/12/4 java 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Identifiers in Java(Java标识符) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Identifiers(標識符) in Java are symbolic(符號化) names used for identification.
They can be a class name, variable name, method name, package name, constant(常量) name, and more.
However, In Java, There are some reserved words(保留字) that can not be used as an identifier.
————————————————————————————————————————————
There are some rules and conventions(慣例) for declaring the identifiers in Java.
If the identifiers are not properly declared, we may get a compile-time error.
Following are some rules and conventions for declaring identifiers:

A valid identifier must have characters [A-Z] or [a-z] or numbers [0-9], and underscore(_) or a dollar sign ($). for example, @javatpoint is not a valid identifier because it contains a special character which is @.

There should not be any space in an identifier. For example, java tpoint is an invalid identifier.
An identifier should not contain a number at the starting. For example, 123javatpoint is an invalid identifier.

An identifier should be of length 4-15 letters only. However, there is no limit on its length. But, it is good to follow the standard conventions.

We can’t use the Java reserved keywords as an identifier such as int, float, double, char, etc. For example, int double is an invalid identifier in Java.

An identifier should not be any query language(查詢語言) keywords such as SELECT, FROM, COUNT, DELETE, etc.

總結

以上是生活随笔為你收集整理的Identifiers in Java(Java标识符)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。