can anyone explain me staic vs instance method ..what are the differnce ?

Recommended Answers

All 2 Replies

An instance method is called by referencing an instance to a class. Therefore it can reference any member in the instance of a class. A static method is called by referencing the class, it can only access other static members of the class, since it is not related to any instance of the class. Hope this clarifies things a bit.

can u explain me with good example>

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.