brising.com Structured Naming Prefixes for Java
a – argument
b – byte (8-bit integer)
c – char (remember: a byte and a char are not the same in Java)
d – double (64-bit IEEE-754 floating-point number)
e – Event (often followed by a class name)
f – float (32-bit IEEE-754 floating-point number)
g – global (static, really)
h – has-a (instance variable, i.e., this object has a value)
i – int (32-bit integer)
j –
k – constant (i.e., final)
l – long (64-bit integer)
m –
n – number of (i.e., how many)
o – Object (usually followed by a class name)
p – Point
q –
r – Rectangle
s – String
t – Throwable (often followed by a class name)
u –
v – vector (an array, not the infernal JDK Vector)
w – word (16-bit integer, this was the wordsize on the CPUs K&R used)
x – Exception (often followed by a class name)
y – yes-or-no (i.e., boolean)
z – size

The order of prefix elements works like this, where underscore indicates nothing:

  [agh_][k_][v_][bcdefilnoprstwxyz]

The first group indicates where the variable came from. Is it an argument (a), a static variable (g), an instance variable (h), or a local variable (no prefix)?

The second group indicates whether you can change the variable's value. Is it a constant or final variable (k), or not (no prefix)?

The third group indicates whether the variable is an array, and, if so, how many dimensions it has. Is it an array (v, where there is one v for each dimension of the array), or not (no prefix)?

The fourth group indicates the variable's type, where most of the prefixes are highly mnemonic. There are some special cases that aid in succinctness:

Note that some of Java's standard classes have their own prefixes, so you can simply write p instead of oPoint, or s instead of oString.

Objects that wrap Java's intrinsic types, for example Integer, are written by prefixing o onto the prefix for the intrinsic type, as in oi.

The n prefix is easily overused, and is often confused with z. n and z are assumed to indicate int values. If you need them to be something else, prefix them with their physical types, e.g. bn or lz.

Don't worry if some of your prefixes become quite long. The alternative is worse.