• Post Reply Bookmark Topic Watch Topic
  • New Topic

When to make a method static

 
Marjorie Gyles
Ranch Hand
Posts: 42
Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When should a method be static? What do you look for?
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 15758
74
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you know what the keyword 'static' means exactly? See this page from Oracle's Java Tutorials: Understanding Instance and Class Members
 
Campbell Ritchie
Marshal
Posts: 53140
124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look for “Campbell Ritchie classification of methods” in the search link above.
 
Marjorie Gyles
Ranch Hand
Posts: 42
Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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. )
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!