There are some conventions that prefix all uses of member fields (or even methods) with this . There are also conventions for prefixing variables or class names (the notorious Hungarian notation). For example, official Android code style rules require a prefix to the name of a private member name using m- (e.g. private int mSize ) and private static with s- .
Personally, I hate both of these conventions because they simply clutter up the already verbose Java code. Modern IDEs provide some means of visual differentiation. For example, in Eclipse, local variables are in a standard black font, while fields are blue. Static methods or fields are in italics.
They also provide great ways to navigate the source code. Ctrl + click on the variable name / method / type allows you to go to its declaration. There are common views. Eclipse even displays a tooltip with information about such a thing only if you hover over it.
Yes, someone may argue that sometimes you do not read the code in the IDE, but in a simple text editor. I sometimes do this to quickly view the code, but to be honest, whenever I want to do some serious encoding without using the IDE, it's just masochism.
Natix
source share