| Author |
Difference static and non static method
|
amit sharma
Ranch Hand
Joined: Jul 19, 2006
Posts: 129
|
|
I want to know the difference between static and non static method except that we can access the static method by class name .How to choose whether method should be declared as static or non static. Thanks
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12929
|
|
|
See this chapter in The Java Tutorial: Understanding Instance and Class Members
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
suji kumar
Greenhorn
Joined: Nov 08, 2006
Posts: 10
|
|
|
If you need the different copies of variable for different object it has to be made instance variabe(non-static). If you want to share a common variable between every object of that class type, you have to go for static variable
|
 |
 |
|
|
subject: Difference static and non static method
|
|
|