Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion 2. Basic Syntax/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,22 @@ Hello World
* <b>Program File Name</b> - Name of the program file should exactly match the class name.
<br><b>Example:</b> Assume 'MyFirstJavaProgram' is the class name. Then the file should be saved as 'MyFirstJavaProgram.java'
* <b>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
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