Syntax of Java
About java programs,it is very important to keep in mind the following pointsCase Sensitivity
Java is case sensitive which means identifier Hello and hello would have different meaning java.Class Name
For all class names the first letter should be in Upper Case.I. If several words are used to form a name of the class ,each inner word's first letter should be in Upper case.
II. Example class MyFirstJavaClass
Method Name
All method names should start with a Lower case letter.I. If several words are used to form the name of the method,then each inner word's first letter should in Upper case.
II.Example public void myMethodName()
Program File Name
Name of the program file should exatly match the class nae.I. When saving the file,youshould save it using the class name and append'.Java'to the end of the name.
II. Example : Assume 'MyFirstJavaProgram'is the class name. Then the file should be saved as "MyFirstJavaProgram.java"
0 comments:
Post a Comment