GeeCON Prague 2014*
The moose likes Beginning Java and the fly likes When to make a method static Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "When to make a method static" Watch "When to make a method static" New topic
Author

When to make a method static

Marjorie Gyles
Ranch Hand

Joined: Nov 03, 2012
Posts: 42

When should a method be static? What do you look for?
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14194
    
  20

Do you know what the keyword 'static' means exactly? See this page from Oracle's Java Tutorials: Understanding Instance and Class Members


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39084
    
  23
Look for “Campbell Ritchie classification of methods” in the search link above.
Marjorie Gyles
Ranch Hand

Joined: Nov 03, 2012
Posts: 42

Thanks guys. That helps a lot. I printed it out to keep beside me so I don't forget it. (Old timer's disease, ya know. )
 
wood burning stoves
 
subject: When to make a method static