Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the responsive-lightbox domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the hueman domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/wp-includes/functions.php on line 6114
Naming convention in Java - Testingpool

Naming convention in Java

In java, when we assign name to identifiers such as class, package,method,variables etc. ,there are certain conditions which should be followed.It is not mandatory, but right way to do that.

It improves the readability of the code.

Name Convention Example
Class Name should be noun and start with uppercase. Try to keep name simple and descriptive. Class DataCheck
Method Name Should be verb. First letter should be lower case and any internal word should start with uppercase getData, runCase
Packages Packages Should be lowercase. Subsequent components may vary from organisation to organisation. com.test.app, com.sun.eng
interface name Should start with upercase MyInterface
variable name Should start with lowercase. Avoid using underscore_ and dollor sign$. int i, double myMoney
constants name Should be all uppercase. Separate words with underscore_ if more than one words. MIN_WIDTH, MAX_LENGTH, COLOR
Ask Question
If you have any question, you can go to menu ‘Features -> Q&A forum-> Ask Question’.Select the desired category and post your question.
Avatar photo

Shekhar Sharma

Shekhar Sharma is founder of testingpool.com. This website is his window to the world. He believes that ,"Knowledge increases by sharing but not by saving".

You may also like...