[brailleblaster] Re: Here's one for the Java experts.

  • From: Richard Baldwin <baldwin@xxxxxxxxxxxxxxx>
  • To: brailleblaster@xxxxxxxxxxxxx
  • Date: Mon, 6 Jun 2011 13:07:04 -0500

If Shell is the name of a class, the only methods that can be called using
the syntax

Shell.dispose();

are static methods. If dispose() is not static, it can't be called this way.

Just a guess. Beyond that, I would need to see some code.

Dick Baldwin

On Mon, Jun 6, 2011 at 12:56 PM, John J. Boyer <john.boyer@xxxxxxxxxxxxxxxxx
> wrote:

> In one of my methods the compiler complains about the statement
> Shell.dispose(); It says I can't call a nonstatic method in a static
> context. The method in which this statement occurs is not static. It was
> moved from another class in which there was no problem.
>
> I can provide the code, of course, but I thought you might be able to
> answer this one from your experience.
>
> Thanks,
> John
>
> --
> John J. Boyer; President, Chief Software Developer
> Abilitiessoft, Inc.
> http://www.abilitiessoft.com
> Madison, Wisconsin USA
> Developing software for people with disabilities
>
>
>


-- 
Richard G. Baldwin (Dick Baldwin)
Home of Baldwin's on-line Java Tutorials
http://www.DickBaldwin.com

Professor of Computer Information Technology
Austin Community College
(512) 223-4758
mailto:Baldwin@xxxxxxxxxxxxxxx
http://www.austincc.edu/baldwin/

Other related posts: