Java Basic Syntax
- Case Sensitivity − Java is case sensitive, which means identifier HelloWorld and helloworld would have different meaning in Java.
- Class Names − For all class names the first letter should be in Upper Case. If several words are used to form a name of the class, each inner word’s first letter should be in Upper Case. Example: class name = JavaClassName
- Method Names − All method names should start with a Lower Case letter. If several words are used to form the name of the method, then each inner word’s first letter should be in Upper Case. Example: method name = methodName()
- Program File Name − Name of the program file should exactly match the class name.When saving the file. Example: class name = ‘JavaClassName’. Then the file should be saved as ‘JavaClassName’
- public static void main(String args[]) − Java program processing starts from the main() method which is a mandatory part of every Java program.
0 Comments