In the Java language, an identifier is a string starting with a letter, underscore (_) or dollar sign ($) and consisting of letters, numbers, underscore (_) or dollar sign ($). Identifiers are case-sensitive and have no limit on length.

In Java, we need to identify many elements of the code, including class names, methods , fields, variables, package names, etc. The name we choose is called an identifier and follows the following rules: (Recommended learning: java course )
(1) The identifier cannot be a keyword or true, false, null.
(2) Identifiers can contain letters, numbers 0-9, underscores (_), or dollar signs ($).
(3) The first character of the identifier must be a letter, underscore (_) or dollar sign ($).
(4) Identifiers are case-sensitive and have no maximum length specified.
Examples of legal identifiers: age, $salary, _value, __1_value Examples of illegal identifiers: 123abc, -salary
It is best to name the identifier to reflect its function and be visible. Know it
For example: The following identifier is legal:
myName,My_name,Points,$points,_sys_ta,OK,_23b,_3_,Myvoid
The following identifier is illegal:
#name,25name,class,&time,if
The above is the detailed content of what is java identifier. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Dreamweaver CS6
Visual web development tools





