1- The identifier have to contain only numbers or alphabetical letters or under score .
2- The first symbol in the identifier have to be alphabetical letter. You can use under score, but it isn't usual to use it.
3- In contrast to under score, the identifier mustn't contain one of the special characters.
4- The small letters don't have the same value of the capital letters.
5- The identifier should be clear enough to understand what it indicates.
6- The first letter of any method name should be capital letter and consist of two wards. Unlike the first word, the second one begin with capital letter.
7- The object name start with capital letter. If it consists of two words, the two wards begin with capita letter.
• Right examples for identifiers:
X , area10 , Y15 , tax_rate , Sum_4 , total_value , REAL , Name_temperature.
• wrong examples for identifiers:
&address , last name , order-no , char , "a".
The symbols used in java language consist of :
1- The Alphabetical letters including capital letters (from A to Z) and small letters (from a to z).
2- The Digits involving numbers (from 0 to 9).
3- The Special characters, which aren't numbers or letters, represent the following symbols:
{ + - / * = % ! \ " ' . , ; ( ) [ ] ? < > : }.
We can use more than one symbol together. For example, "\n", which is a combined two symbols, represent a command that makes the consular move to a new line. This way of use symbols are known as "escape sequences" .
The reserved wards (or main words), that have been identified in Java language, have a special meaning and are just used for specific purposes, so you can't use them as varieties. These reserved wards are :
auto , extern , sizeof , break , if , float , static , case , struct , for , char , goto , switch , const , int , typeof , continue, union , do , default , long , register , void , double , else , return , volatile , short , while , enum , signed , near , asm , entry , fortran , huge , pascal , ada .
Published by anas mhna
- How to Choose the Perfect Names in JavaNames that you choose for a variable in Java is called an identifier. You can't choose just any name, and this article will explain how to choose good names for identifiers in Java.
- Digital Object Identifiers - DOIThe Association of American Publishers (APA) has an Enabling Technologies Committee. Fittingly, at the Frankfurt Book Fair of 1997, it announced the DOI (Digital Object Identifier) initiative.
- Inserting and Using Special Characters in Google Docs DocumentsThis tutorial will show you how to insert special characters into your Google Docs Documents.
- How You Start Learning Java LanguageHow you can begin learning Java programming language.
- Data Types in Java LanguageThe java programming language has many built-in data types. These fall into two broad categories: class type and primitive types. Primitive types are simple values, not objects. Class types are used for more complex t...
- How You Use Comments, Escape Characters and Constants in Java Language
- Bridging the Gap Between Java and XML
- Java Programming Tutorials: The Online Give and Take
- New Theories on Language Shed Light on the Nature of Music
- 1031 Exchange: A Real Estate Investor's Safe Harbor from Capital Gains Taxes
- A Short Introduction to Java Programming Language
- Tips for a Professional Letter Layout

