Tutorials for Java ,Core java ,Advance java ,oracle ,HTML, CSS, JavaScript, Java and other programming language tutorial Learn Java tutorial for beginners with examples in eclipse online. Java tutorial point for core java, servlet, jsp, struts, spring, for learning web technologies online. Content includes tutorials and references relating to HTML, CSS, JavaScript, PHP, AngularJS, SQL, Bootstrap, Node.js, and jQuery this is a website like w3school tutorialspoint etc

Search This Blog


Header Ads

Tuesday, 29 May 2018

Java Coding Standard


Java Coding Standard

Coding standards for classes 

Usually class name should be noun. Should starts with upper case letter and if it contain multiple words every inner words also should start with capital letters.  Ex:   String   StringBuffer   NumberFormat CustomerInformation

 Coding standards for Interfaces 

Usually interface named should be adjective, starts with capital letters and if it contains multiple words, every inner word also should starts with capital letter.  Ex:   Runnable   Serializable   Clonable   Movable   Transferable   Workable 

Coding standards with methods

 Values should be either verbs or verb + noun combination. Starts with lower case and every inner words starts with upper case(this convention is also called camel case convention). Ex:   getName(), getMessage(), toString(), show(), display(). 

Coding standards for variables 

Usually the variable starts with noun and every inner word should start with upper case i.e camel case convention.  Ex:   Name, rollno,  bandwidth, totalNumber. 

Coding standards for constants 

It should be noun, it should contain only upper case letters and works are separated with underscores.  Ex:   MAX_SIZE, MIN_PRIORITY, COLLEGE_NAME. 

No comments:

Post a Comment