File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes methods  (class and instance) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "methods  (class and instance)" Watch "methods  (class and instance)" New topic

methods (class and instance)

adam Lui
Ranch Hand

Joined: Sep 03, 2007
Posts: 186
whats the difference between class methods and instance methods?!
marc weber

Joined: Aug 31, 2004
Posts: 11343

A class method is declared with the keyword "static." This means it can be called using the class, even if no instance of that class is created.

An instance method is not static. It must be called using an instance.

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
I agree. Here's the link:
subject: methods (class and instance)
It's not a secret anymore!