Is there a standard in java for _ (underscore) in front of variable or class names?

I think artifacts like these are pre-IDE and C++ vintage. Don't do it.


It is a matter of personal taste.

Martin Fowler appears to like it. I don't care much for it - it breaks the reading pattern, and the information it conveys is already subtly told by color in your IDE.

I've experimented with using _ as the name of the variable holding the result to be returned by a method. It is very concise, but I've ended up thinking that the name result is better.

So, get your colleagues to agree on what you all like the most and then just do that.


if you want to follow best practice java , use the code convention outlined here http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html

I.e., no underscore for private member variable names.

Tho, personally, i m not fussed either way, as long as consistency is applied.