Java is a case sensitive language so the way of writing code is important.
1. All Java classes,Abstract classes and Interface names should start with uppercase letter ,if any class contain more than one word every inner word also start with capital letters.
Ex: String
StringBuffer
FileInputStream
2.All java methods should start with lower case letters and if the method contains more than one word every inner word should start with capital letters.
Ex :-
post()
toString()
3. All java variables should start with lowercase letter and inner words start with uppercase letter.
Ex:-
pageContent
bodyContent
4. All java constant variables should be in uppercase letter.
Ex:
MIN_PRIORITY
MAX_PRIORITY
NORM_PRIORITY
5. All java packages should start with lower case letters only.
Ex: java.awt
Java.io
NOTE:-The coding standards are applicable for predefined library not for user defined library .But it is recommended to fallow the coding standards for user defined library also.
1. All Java classes,Abstract classes and Interface names should start with uppercase letter ,if any class contain more than one word every inner word also start with capital letters.
Ex: String
StringBuffer
FileInputStream
2.All java methods should start with lower case letters and if the method contains more than one word every inner word should start with capital letters.
Ex :-
post()
toString()
3. All java variables should start with lowercase letter and inner words start with uppercase letter.
Ex:-
pageContent
bodyContent
4. All java constant variables should be in uppercase letter.
Ex:
MIN_PRIORITY
MAX_PRIORITY
NORM_PRIORITY
5. All java packages should start with lower case letters only.
Ex: java.awt
Java.io
NOTE:-The coding standards are applicable for predefined library not for user defined library .But it is recommended to fallow the coding standards for user defined library also.
No comments:
Post a Comment