🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #893

Re: Static Method ? Static Variable ?

#893
From: Boyick Mhlanga
Date: Thu, 02 Mar 2000 00:00
32 lines
1554 bytes
Most java books do explain these

a static method is a method that cannot be overriden. once defined in
class sub  classes cannot redefine the method.

a stativ variable is a variable that cannot be reassigned a new value eg

private static int i=0;

creates a variable that is initalied to 0 any attemps to assign another
value to i will result in an error. besides static variables belong to
the class not instances of the class.

any java text will give explanations to these as well as examples

Good luck in your studies

Robert wrote:

> 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: <38BDFEA3.EFF33FCF@nexted.com>
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: Boyick Mhlanga <boyick.mhlanga@nexted.com>
Subject: Re: Static Method ? Static Variable ?
Date: 2000/03/02
Message-ID: <38BDFEA3.EFF33FCF@nexted.com>
X-Deja-AN: 592099220
Content-Transfer-Encoding: 7bit
References: <6wmv4.1491$vW.3803@news-server.bigpond.net.au>
X-Original-NNTP-Posting-Host: 139.86.72.47
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: news@uq.edu.au
X-Trace: bunyip.cc.uq.edu.au 951975801 9991 139.86.208.29 (2 Mar 2000 05:43:21 GMT)
Organization: University of Queensland
Mime-Version: 1.0
NNTP-Posting-Date: 2 Mar 2000 05:43:21 GMT
Newsgroups: aus.computers.java