Java-Naming conventions

Why Naming Standard..?

Easy to read for both the code developer and also  to other programmer

Easily find and fix the bug

Types of cases: R  ‘4’

Lower case:

Ex: hellojava

ApplicableTo: packages

Upper case:


ApplicableTo: Constant

Camel @ Upper CamelCase:

Ex: HelloJava

ApplicableTo: class, Interface, Variables

Mixed@  Lower CamelCase :

Ex: helloJava

ApplicableTo: methods,


  •  For interface the coder can append I before the name of the interface ie) IClonable
  • For constant having 2 words it is seperated by ‘_’  (underscore) ie)  CONSTANT_OF_PARAM
  • For package name for application it may be  ie) com.companyname.clientapplicationname

Comments in Java:

There are 3 types of comments in java namely

/* For methods ,variables  definition */

/** For documentation  purposes*/   

//for single line user command  

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: