• Post Reply Bookmark Topic Watch Topic
  • New Topic

what is the convention of class names ?  RSS feed

 
William Peck
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am maintaining a small web application (displays Oracle data on jsp's, using Spring Framework).

Some of the classes are named xxxYyyyItem, whereas others do not have "Item", e.g.

- IntegrationRangeItem.java
- LoadHistory.java

Is there any particular naming convention in regards to adding "Item" to a class name ?
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Convention is to always start a class name with an uppercase letter and spell in camel case, which means that every noun's first letter is uppercase. No matter if your class name contains item or not.
 
William Peck
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sebastian,

all right, sounds good, thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66307
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And be sure to use complete words. No freeze-drying words or leaving out vowels. This is Java not FORTRAN.
 
William Peck
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear B, ok, got 'cha, thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!