🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #900

Re: Static Method ? Static Variable ?

#900
From: Cannon
Date: Tue, 07 Mar 2000 00:00
39 lines
2392 bytes
> Actually, the static variable should not have a proceeding
> underscore... In fact the java naming conventions state that,

You are correct, I actually remember someone mentioning the reason it is
allowed 'cause of arguments in the community.
In the Unix world C programs traditionally use the underscore a lot.
I personally "started" using it recently since it is a good way to
distinguish types.
Reason not to use it, I see many, best one, the fact you can not double
click copy the whole variable in one go in some text processors. However,
under Unix as an computer engineer, you don't worry about text related
editing things.

(Sorry if I am going a bit to far in explanation...)


Benjamin Johnston <s355171@student.uq.edu.au> wrote in message
news:Pine.OSF.4.21.0003071034590.27098-100000@student.uq.edu.au...
> > I think the convention is to name variable in the following way.
> >
> > String eat;
> > static String _eat = "this";
> > final static String EAT = "this"; // I my self use all caps for finals
> > (globals).
> >
> Actually, the static variable should not have a proceeding
> underscore... In fact the java naming conventions state that, "Variable
> names should not start with underscore _ or dollar sign $ characters,
> even though both are allowed".
>
> You are correct on the other examples, though.
>
> See:
> http://java.sun.com/docs/codeconv/html/CodeConventions.doc8.html#34851
>
> -Benjamin Johnston
> s355171@student.uq.edu.au
>
>
Technical Details
Message-ID: <lcZw4.66$5G5.7285@nsw.nnrp.telstra.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <6wmv4.1491$vW.3803@news-server.bigpond.net.au> <34Gw4.109$Aq5.6072@nsw.nnrp.telstra.net> <Pine.OSF.4.21.0003071034590.27098-100000@student.uq.edu.au>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d6db,9fd80fce16393cf3
X-Google-Attributes: gid10d6db,public
From: "Cannon" <cannon@nospam.basketball.net.au>
Subject: Re: Static Method ? Static Variable ?
Date: 2000/03/07
Message-ID: <lcZw4.66$5G5.7285@nsw.nnrp.telstra.net>
X-Deja-AN: 594069402
References: <6wmv4.1491$vW.3803@news-server.bigpond.net.au> <34Gw4.109$Aq5.6072@nsw.nnrp.telstra.net> <Pine.OSF.4.21.0003071034590.27098-100000@student.uq.edu.au>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
X-Complaints-To: abuse@telstra.net
X-Trace: nsw.nnrp.telstra.net 952393617 203.35.100.252 (Tue, 07 Mar 2000 12:46:57 EST)
Organization: Customer of Telstra Big Pond Direct
X-MSMail-Priority: Normal
Reply-To: "Cannon" <cannon@nospam.basketball.net.au>
NNTP-Posting-Date: Tue, 07 Mar 2000 12:46:57 EST
Newsgroups: aus.computers.java