Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Class methods vs. Instance methods

763890Mar 5 2010 — edited Mar 7 2010
When shall we use class methods instead of instance methods , and vice versa?

By going through the Java Tutorial, it only says the following.

A common use for static methods is to access static fields....

I am definitely sure that class methods aren't just exist for accessing static fields of a class.

PS. I understand that instance methods belong to the object that is instantiated and class methods belong to the class itself.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 4 2010
Added on Mar 5 2010
23 comments
487 views