I'm not sure of the rules per se, but the use of underscores makes it easy to quickly distinguish local versus class variables with the latter using underscores.

Regards

----Original Message Follows----
From: "A. Kevin Baynes" <[EMAIL PROTECTED]>
Reply-To: "A. Kevin Baynes" <[EMAIL PROTECTED]>,"Research Triangle Java User's Group mailing list."<[email protected]>
To: "Research Triangle Java User's Group mailing list." <[email protected]>
Subject: [Juglist] Variables starting with underscore
Date: Wed, 4 May 2005 17:38:12 -0400


I've noticed in some Java code I've read, variables starting with a
single underscore or two underscores.

private static WeakHashMap __servers = new WeakHashMap();

I'm guessing that this is a coding convention from a preceding
language(s) (C/C++, perhaps?), and that perhaps it is used to
distiguish variable scope (globals, perhaps?)

Can someone school me on the rules?

~akb
_________________
A. Kevin Baynes

_______________________________________________
Juglist mailing list
[email protected]
http://trijug.org/mailman/listinfo/juglist_trijug.org



_______________________________________________
Juglist mailing list
[email protected]
http://trijug.org/mailman/listinfo/juglist_trijug.org

Reply via email to