KEY FACTORS IN JAVA
The factors which are listed below will help you @ the level of begging.
1.Java is a pure Object-Oriented Programming Language(OOPL).
2.There are four important key factors that completely constitutes java language,they are
- Class
- Object
- Variable
- Method
ARCHITECTURE FOR SIMPLE JAVA PROGRAM
class classname
{
variable(s);
method(s)
{
................
................
}
}
1.classname is a user-defined name.
2.method(s) and varibles can be either pre-defined or user defined or the both.
3.All the code will come under the class block.
SET OF RULES WHILE WRITING A JAVA PROGRAM
1.The file name and the class name should be the same one.
2.The class name should start with the capital letter or with an upper case letters and the consecutive word should also have the same constraint.
3.The method name should start with small or lower case letters and all the consecutive word will start with capital letter.
Example:
Naming a class:
- SampleJavaProgram
- MyFirstProgram
Naming a mathods:
- doSampleJavaProgram()
- runMyFirstProgram()
Will meet you in the next post with a simple java program with all the above constraints.....
No comments:
Post a Comment