From df1501770184c553793316c1dc2f05b1395389a5 Mon Sep 17 00:00:00 2001 From: Nirosha Jayasundara <32589901+niroshajayasundara@users.noreply.github.com> Date: Wed, 30 Oct 2019 20:50:08 +0530 Subject: [PATCH] Update README.md --- 2. Basic Syntax/README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/2. Basic Syntax/README.md b/2. Basic Syntax/README.md index 0abcfb1..b4d2f7c 100644 --- a/2. Basic Syntax/README.md +++ b/2. Basic Syntax/README.md @@ -32,5 +32,22 @@ Hello World * Program File Name - Name of the program file should exactly match the class name.
Example: Assume 'MyFirstJavaProgram' is the class name. Then the file should be saved as 'MyFirstJavaProgram.java' * public static void main(String args[])/b> - Java program processing starts from the main() method which is a mandatory part of every Java program. + +### Java Identifiers +All Java components require names. Names used for classes, variables, and methods are called identifiers. -Source: [tutorialspoint](https://www.tutorialspoint.com/java/java_basic_syntax.htm)2 \ No newline at end of file +In Java, there are several points to remember about identifiers. They are as follows − + +* All identifiers should begin with a letter (A to Z or a to z), currency character ($) or an underscore (_). + +* After the first character, identifiers can have any combination of characters. + +* A key word cannot be used as an identifier. + +* Most importantly, identifiers are case sensitive. + +* Examples of legal identifiers: age, $salary, _value, __1_value. + +* Examples of illegal identifiers: 123abc, -salary. + +Source: [tutorialspoint](https://www.tutorialspoint.com/java/java_basic_syntax.htm)2