On 25 May 2004 06:51:31 -0700, Priyanka AGARWAL wrote:
> Thanks.Ya you are true,we were using C style naming convention.
>
> So my sz_working_directoy becomes workingDirectory . Is it correct.
> But how do we differentiate between different data types. What do we
> do for integers.??
I have never been a fan of naming systems that attempt to encode
information about the data type in the name of each variable, and in
fact I don't believe that it is necessary to do so.
Do you not already know that something like "wordCount" is an integer,
or "fileName" is a String? These are admittedly simple examples, but
simply knowing that a variable contains an integer doesn't prevent you
from doing silly things like adding "wheelDiameter" to "daysInMonth",
and expecting to get a meaningful result.
I suggest that you search this group for things like "hungarian
notation", "naming conventions" or similar terms, to see what others
have written. The topic comes up occasionally and usually leads to
much discussion (as I am sure it will here too).
Also have a look at some of the Java style guides that are available.
Here are a few links, in no particular order:
http://java.sun.com/docs/codeconv/
http://gee.cs.oswego.edu/dl/html/javaCodingStd.html
http://www.chimu.com/publications/ja...rds/index.html
http://developer.netscape.com/docs/t...codestyle.html
http://membres.lycos.fr/beust/naming/
http://directory.google.com/Top/Comp...ing_Standards/
/gordon
--
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e