This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes coding standard in java project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "coding standard in java project" Watch "coding standard in java project" New topic

coding standard in java project

priyanaka jaiswal
Ranch Hand

Joined: Jun 03, 2011
Posts: 79

what coding standard we need to follow while developing application?

Thanks in advance
fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11168

if you are coding by yourself, for yourself, you can use any standard you want - but make sure you DO use one.

If you are working for a company or in a group, you should use whatever standard the group/company tells you to use.

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Matthew Brown

Joined: Apr 06, 2010
Posts: 4344

That depends. If you're working for an organisation that has a coding standard, or you're forced to use one for some other reason, use that one.

If you're choosing to follow a coding standard, then it's entirely up to you. If you Google you'll find plenty (e.g.,, and you just need to choose one you like.
priyanaka jaiswal
Ranch Hand

Joined: Jun 03, 2011
Posts: 79
thank you for quick response
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 38045
We have our own, but a lot of people myself included think things like “avoid do loops” are unnecessarily strict. The few style guides I have seen seem to be several years old.
Rafael Prado Oliveira

Joined: Apr 30, 2013
Posts: 28
I suggest you to follow Java Good Pratices
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074

I think that most developers follow the standards that Sun invented long ago: CamelCase for class and interface names, lowerCamelCase for methods and variables, etc. - see the document Code Conventions for the Java Programming Language, which is and old document (1999) but which still has some relevance.

A book which is not just about coding standards but also about good Java programming practice is Effective Java - every Java developer should read this book.

Consider using tools such as Checkstyle, PMD and FindBugs, which will check for style and many common programming problems in Java programs.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
I agree. Here's the link:
subject: coding standard in java project
Similar Threads
A looping algorithm question?
WA #1.....word association
Some coding standards
Coding Standard
Coding Standards