🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #897

Re: Static Method ? Static Variable ?

#897
From: Cannon
Date: Mon, 06 Mar 2000 00:00
33 lines
1650 bytes
Static is similar to global on class level, other variables are on object
(instance) level.
Or on can say, you initiate a single variable to be shared and used by any
number of instances of that class, by declaring it static.
final static is a >> constant << variable that once initilised can never be
changed.

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).



Robert <mwalker1@bigpond.net.au> wrote in message
news:6wmv4.1491$vW.3803@news-server.bigpond.net.au...
> Hi,
> I'm a first year IT student, I need to find out
>
> A) What is a Static Method
>
> b) What is a Static Variable
>
> or if u know where i could find the information.
> Thanks for ur help.
>
> Cheers
>
> Robert
>
>
Technical Details
Message-ID: <34Gw4.109$Aq5.6072@nsw.nnrp.telstra.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <6wmv4.1491$vW.3803@news-server.bigpond.net.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/06
Message-ID: <34Gw4.109$Aq5.6072@nsw.nnrp.telstra.net>
X-Deja-AN: 593659742
References: <6wmv4.1491$vW.3803@news-server.bigpond.net.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 952315263 203.35.100.252 (Mon, 06 Mar 2000 15:01:03 EST)
Organization: Customer of Telstra Big Pond Direct
X-MSMail-Priority: Normal
Reply-To: "Cannon" <cannon@nospam.basketball.net.au>
NNTP-Posting-Date: Mon, 06 Mar 2000 15:01:03 EST
Newsgroups: aus.computers.java