Share on Google+Share on Google+

Chris Scott
what is a indentifier
2 Answer(s)      8 years ago
Posted in : Java Beginners


View Answers

September 29, 2008 at 10:25 AM

An identifier is an unlimited-length sequence of Java letters and Java digits, the first of which must be a Java letter. An identifier cannot have the same spelling (Unicode character sequence) as a keyword, boolean literal, or the null literal.

IdentifierChars but not a Keyword or BooleanLiteral or NullLiteral

IdentifierChars JavaLetterOrDigit

any Unicode character that is a Java letter (see below)

any Unicode character that is a Java letter-or-digit (see below)

Letters and digits may be drawn from the entire Unicode character set, which supports most writing scripts in use in the world today, including the large sets for Chinese, Japanese, and Korean. This allows programmers to use identifiers in their programs that are written in their native languages.
A "Java letter" is a character for which the method Character.isJavaIdentifierStart(int) returns true. A "Java letter-or-digit" is a character for which the method Character.isJavaIdentifierPart(int) returns true.

The Java letters include uppercase and lowercase ASCII Latin letters A-Z (\u0041-\u005a), and a-z (\u0061-\u007a), and, for historical reasons, the ASCII underscore (_, or \u005f) and dollar sign ($, or \u0024). The $ character should be used only in mechanically generated source code or, rarely, to access preexisting names on legacy systems.

The "Java digits" include the ASCII digits 0-9 (\u0030-\u0039).

Two identifiers are the same only if they are identical, that is, have the same Unicode character for each letter or digit.

Identifiers that have the same external appearance may yet be different. For example, the identifiers consisting of the single letters LATIN CAPITAL LETTER A (A, \u0041), LATIN SMALL LETTER A (a, \u0061), GREEK CAPITAL LETTER ALPHA (A, \u0391), CYRILLIC SMALL LETTER A (a, \u0430) and MATHEMATICAL BOLD ITALIC SMALL A (a, \ud835\udc82) are all different.

Unicode composite characters are different from the decomposed characters. For example, a LATIN CAPITAL LETTER A ACUTE (, \u00c1) could be considered to be the same as a LATIN CAPITAL LETTER A (A, \u0041) immediately followed by a NON-SPACING ACUTE (, \u0301) when sorting, but these are different in identifiers. See The Unicode Standard, Volume 1, pages 412ff for details about decomposition, and see pages 626-627 of that work for details about sorting. Examples of identifiers are:



September 29, 2008 at 11:02 AM

Hi friend,

Identifiers are the names of variables, methods, classes, packages and interfaces. In the HelloWorld program, HelloWorld, String, args, main and println are identifiers.

Identifiers must comply with these rules:

* The first character of an identifier must be a letter, an underscore(_), or a dollar sign($).
* The rest of the characters in the identifier can be a letter, underscore, dollar sign, or digit. Note that spaces are NOT allowed in identifiers.
* Identifiers are case-sensitive. This means that age and Age are different identifiers.
* Identifiers cannot match any of Java's reserved words.


These identifiers are valid:


These identifiers are NOT valid:

My Class // spaces are not allowed
numberOf*s // the asterisk cannot be used
final // final is a reserved word
1Way // identifiers cannot start with a digit


Visit for more information.



Related Tutorials/Questions & Answers:
what is a indentifier - Java Beginners
what is a indentifier  What is an identifier and what is the definition?  An identifier is an unlimited-length sequence of Java letters and Java digits, the first of which must be a Java letter. An identifier cannot
what is bit
what is bit  what is bit
What is procedure
What is procedure  What is procedure in computers? What are the primary categories of procedures
what are indices?
what are indices?  what are indices
what is collections?
what is collections?  what is collections
What is this keyword?
What is this keyword?  What is this keyword
what is Savepoint ?
what is Savepoint ?  what is Savepoint
What is a "constraint"?
What is a "constraint"?  What is a "constraint
What is Index?
What is Index?  What is Index
What is SQLLoader?
What is SQLLoader?  What is SQLLoader
What is DML?
What is DML?  What is DML
What is an interface?
What is an interface?  What is an interface
What's PHP ?
What's PHP ?  What's PHP
What is VLR ?
What is VLR ?  hii, What is VLR
What is Trigger?
What is Trigger?  What is Trigger
What is ActionServlet?
What is ActionServlet?  What is ActionServlet
What is FBT
What is FBT   hello, What is FBT
What is JDBC?
What is JDBC?  What is JDBC
What is an Abstract Class and what is it's purpose?
What is an Abstract Class and what is it's purpose?   Hi, What is an Abstract Class and what is it's purpose? Thanks
What is a transaction and what are ACID properties?
What is a transaction and what are ACID properties?  What is a transaction and what are ACID properties
What is DataAccessException?
What is DataAccessException?  Hi, What is DataAccessException? thanks
What is IOC ?
What is IOC ?  HI, What is IOC or Dependency Injection? Thanks
What is SQLExceptionTranslator?
What is SQLExceptionTranslator?  Hi, What is SQLExceptionTranslator? Thanks
What is Externalizable?
What is Externalizable?   Hi, What is Externalizable? Thanks
What is the % operator?
What is the % operator?   Hi, What is the % operator? thanks
What is casting?
What is casting?   Hi, What is casting? thanks
What are Struts?
What are Struts?  What are Struts? Can anyone explain me what are the Struts framework and what are its uses? Thanks
What is WAP?
What is WAP?  What is WAP?   Hi, Check the tutorial: What is WAP? Thanks
What is CRM?
What is CRM?  Can anyone tell me What is CRM? Thanks
what is RUP?
what is RUP?  hello, what is RUP??   hii, RUP is stands for Rational Unified Process
What is a tuple?
What is a tuple?  What is a tuple?   hi, A tuple is an instance of data within a relational database. Thanks
Java Spring Hibernate Struts Training Retrieve database from the table dynamically in jsp from oracle using servlet What does core Java include? java What are some way to learn Java quickly? Is it required to learn Java before learning Java Script? Is it necessary to learn java script before learning PHP? Are HTML5 and Java Script boosts Java career? Is Java object oriented? Fingerprint application with Java Uninstall Oracle Virtual Box JSON to HashMap Free Java online Training I want example of Control Statement in Java ANSI Color Codes with Python Create a Program that Calculates Input What is difference between JDK,JRE and JVM? How to see ubuntu version on server? How to get Page Source in Selenium (WebDriver) using Java? The path to the driver executable must be set by the webdriver.gecko.driver system property parse data from a link in java Java Program Qns using BlueJ How to fix HAX Kernel Module Is Not Installed error? Installing Audacity Looking for code Logic to check track changes & Coments in MSWord, MSWordx, MSExcel, MSExcelx is ON/OFF Installing JDK on Mac SAX Parser exception ERROR 601 (42P00): Syntax error. Encountered Thread java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory How to install Ubuntu 16.04 LTS? HttpServletRequest cannot be resolved to a type in eclipse - Solved Unhandled event loop exception GC overhead limit exceeded Spring Data jpa with apache phoenix Caused by: java.lang.IllegalArgumentException: Not a host:port pair: PBUF o.a.h.h.z.RecoverableZooKeeper - Possibly transient ZooKeeper, quorum= com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager class not found com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager not found How to download and install Java 8 on Windows? How to uninstall JDK 7? How to install gtk-doc-tools package in Ubuntu? How to install Oracle JDK 8 on Ubuntu? ejabberd_ctl.beam not found - Solved How to convert date to UTC format in Java? How to install autoconf, automake and libtool in Ubuntu 15.10? How to convert current date to mm dd yyyy format in Java? How to convert current date to dd mm yyyy format in Java? How to stop window closing in "internalFrameClosing" event. How to find list of all index in Neo4j? file location SASLError using PLAIN: not-authorized


Advertisement null