Field Naming Conventions

Home - About » Computer Science - Programming - Conventions
Computer Science
Research, Industry Work,
Programming
Community Service
Hillside Group, CHOOSE,
Stanford GSA
The Serious Side
Business School,
Learning Chinese
Humorous Takes
Switzerland, United States,
Software, Fun Photos
Travel Stories
Europe, United States, Asia
  
Living Places
Berlin (+ Gallery), Zürich
Boston, S.F. + Bay Area

The field naming conventions are simple:

  • f for fields, for example, fMyField, fValue, fBalance
  • g for special global and public fields, for example, gSingleton (use discouraged)
  • s for static fields, for example, sReferenceValue, sValueManager
  • CAPS for constants, eg static final HASHCACHE_NOT_SET
Copyright (©) 2007 Dirk Riehle. Some rights reserved. (Creative Commons License BY-NC-SA.) Original Web Location: http://www.riehle.org