This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
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


Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
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: 14991
    
  27

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: 44433
    
  33
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. )
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: When to make a method static
 
It's not a secret anymore!