🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #18571

Re: HELPHELPHELP

#18571
From: Greg Hamer
Date: Fri, 22 May 1998 00:00
30 lines
1343 bytes
This usually happens when you are writing code inside a static method (like
main), and you forget that 'this' is not accessible
So for instance, in the static main for the Foo class, you need to say things
like
Foo f = new Foo();
f.myMethod();

instead of just calling myMethod()

Helmut Reichert wrote:

> How can I avoid this:
>
> non-static method ... cannot be referenced from a static context
>
> ???
>
>   ------------------------------------------------------------------------
>
>   Helmut Reichert <helmutr@aschaffenburg.baynet.de>
>
>   Helmut Reichert
>     <helmutr@aschaffenburg.baynet.de>
>     Netscape Conference Address
>     Netscape Conference DLS Server
>   Additional Information:
>   Last Name    Reichert
>   First Name   Helmut
>   Version      2.1
Technical Details
Message-ID: <356617BF.A234DAF6@corp.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3565CA84.F227800E@aschaffenburg.baynet.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,74a54520366d3825
X-Google-Attributes: gidf74b3,public
From: Greg Hamer <ghamer@corp.borland.com>
Subject: Re: HELPHELPHELP
Date: 1998/05/22
Message-ID: <356617BF.A234DAF6@corp.borland.com>
X-Deja-AN: 355713272
Content-Transfer-Encoding: 7bit
References: <3565CA84.F227800E@aschaffenburg.baynet.de>
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language