Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"static" question (in Eclipse)

Status
Not open for further replies.

jemminger

Programmer
Joined
Jun 25, 2001
Messages
3,453
Location
US
i'm not sure if this is specific to Eclipse, but what does it mean when i get the error

"the static method foo() from the type Foo should be accessed in a static way"

and how to correct it?

thanks,
jeff


=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
 
figured it out...

changed from
Foo foo = new Foo();
foo.method();

to
Foo.method();

still getting the hang of static/class methods!

=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
 
stefanwagner,

it's actually neither - this is all pseudocode :-)

=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
 
Ok. I did't knew the phrase 'getting the hang of sth.', and thought, you're still stuck.

Fazit: wrong pseudocode is wrong code too. :)
 
sorry...yes, all sorted out now.

"getting the hang of" == "getting used to" == "learning"

=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top