• Post Reply Bookmark Topic Watch 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This page was migrated from a javaranch.com.jsp


   
   
     
     Java Programming Style Guide
   
 






2 - Identifiers

All identifiers use letters ('A' through 'Z' and 'a' through 'z') and numbers ('0'
through '9') only. No underscores, dollar signs or non-ascii characters.



Hungarian Notation violates OO abstraction and is not to be used.







2.1 - Classes and Interfaces

All class and interface identifiers will use mixed case. The first letter of each word
in the name will be uppercase, including the first letter of the name. All other letters
will be in lowercase, except in the case of an acronym, which will be all upper case.



Examples:


     

    Customer

     SalesOrder

     TargetURL

     URLTarget

     








2.2 - Packages

Package names will use lower case characters only. Try to keep the length under eight
(8) characters. Multi-word package names should be avoided.



Examples:


     

    common

     core

     lang

     








2.3 - All Other Identifiers

All other identifiers, including (but not limited to) attributes, variables, methods
and parameters will use this default naming convention. This includes final identifiers
(using all upper case, as traditionally done in C, is a violation of OO abstraction). The
first letter of each word in the name will be uppercase, except for the first letter of
the name. All other letters will be in lowercase, except in the case of an embedded
acronym, which will be all uppercase. Leading acronyms are all lower case.



Examples:


     

    customer

     salesOrder

     targetURL

     urlTarget

     



 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic