*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 13868
    
  10

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 7 API documentation
Scala Notes - My blog about Scala
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36453
    
  15
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
 
Similar Threads
why do we get 40?
static block
Static variables and memory
When static { .. } executed ?
method hiding a method in super class