Welcome to the CSC Q&A, where you can get help (and share your knowledge) about computer science!

How do you differentiate between Instance method and static method

+4 votes
asked Oct 10 in CSC 211 (F17) by Thomas Ayele (2,875 points)

2 Answers

0 votes
 
Best answer
"Static methods are the methods in Java that can be called without creating an object of class and Instance method are methods which require an object of its class to be created before it can be called. To invoke a instance method, we have to create an Object of the class in within which it defined."

you can read more on http://www.geeksforgeeks.org/static-methods-vs-instance-methods-java/
answered Oct 10 by Jason Dedjoe (2,419 points)
selected Oct 10 by Thomas Ayele
0 votes

I think the Static Method refers to the class' static code while the Instance one refers to an object/instance of that class' code. In another word, instance method requires an object of its class to be created before it can be called while static method doesn't require object creation.

 

answered Oct 10 by Tiffany Nguyen (2,268 points)
...