"MANIK " <firstname.lastname@example.org> wrote in message news:email@example.com... > what is the difference between instance methods and static methods
Instance methods need to be called on an instance of a class. For instance, if you had a car class the getColor method would need to be an instance method because each car can have a different color.
Static methods do not need a class instance to be called; they are associated with the class as a whole. For instance, the aforementioned car class could have a static method isCar that always returns true. We don't need to examine a particular car to determine if it is a car; by definition, cars are cars.