my dog learned polymorphism*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "methods  (class and instance)" Watch "methods  (class and instance)" New topic
Author

methods (class and instance)

adam Lui
Ranch Hand

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


boolean b = true;<br />System.out.println ("I believe in Java.<br />Java will make my dream come " + b);
marc weber
Sheriff

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
sscce.org
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: methods (class and instance)
 
Similar Threads
Lock on hidden and hiding static method.
abstract class and "this"
Static and Non static Synchronized methods
factory methods???????
Two sync methods of same class called by two threads