MUST follow coding conventions in JAVA : Presenting you a list of 15 coding conventions in Java. These are considered good programming ...
MUST follow coding conventions in JAVA : Presenting you a list of 15 coding conventions in Java. These are considered good programming practices and must be followed if you are to become a good Java developer.
If you find 15 must follow coding conventions in JAVA helpful, share the same with more budding developers. Also, before you execute your first program, don't forget to raise a toast to the man below.
- The class name should clearly convey the purpose of program.
- The class name should begin with an upper-case letter.
- If your class name contains more than one word, you can join them using the underscore( _ ) symbol.
- If your class name contains more than one word, you may also use the Camel-Case.
- Variables and method names should justify their purpose.
- Variable names or method names should start with lower case letters. Two or more words can be joined using '_' or '$' or the Camel-Case.
- Only the names of a class or an interface should begin with upper-case letters.
- The opening braces( { ) for a class, or a method, etc should start from the same line on which the class, or the method signature has been declared.
- The closing braces( } ) should be in alignment with the beginning of class/method definition.
- Proper orientation should be maintained throughout the program.
- You can make use of loops to avoid duplicate code.
- Using appropriate data types makes the code memory efficiently.
- Make sure all the leak-able resources once used are closed.
- Display outputs with proper messages.
- Leaving comments is always considered a good programming practice.
If you find 15 must follow coding conventions in JAVA helpful, share the same with more budding developers. Also, before you execute your first program, don't forget to raise a toast to the man below.
COMMENTS