• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

coding standard in java project

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,


what coding standard we need to follow while developing application?


Thanks in advance
 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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. http://www.oracle.com/technetwork/java/codeconv-138413.html, https://code.google.com/p/java-coding-standards/), and you just need to choose one you like.
 
priyanaka jaiswal
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you for quick response
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I suggest you to follow Java Good Pratices
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic