Naming convention in java

Package :-

It should be lowercase

if multiple use dot like com.codingsansar

Constant :-

It should be in UPPERcase letter like RED, YELLOW

if name contain multiple then seperated by _

like MAX_PRIORITY

It may contain digits but not in first character

exp – static final int MIN_AGE =18;

Class :-

Name should be start from uppercase letter .

it should be Noun

Interface :-

Should start with Uppercase letter

It should be Adjective

Method :-

It should start with lowercase letter

It should be a verb such as main(), print(), println().

If the name contains multiple words , start it with a lowercase letter followed by an UPPERcase letter such as actionPerformed().

Variable :-

It should start with the lowercase letter. such as id, name.

should not start with $, & ,_ etc .

it can be multiple in camelcase firstName

Avoid using one character variable a,b,c,x,y,z etc.