What is the difference between static and instance methods?

0

Static methods are methods which can be called irrespective of the class instance. Only static attributes and static events can be accessed within the Static method. Memory is allocated once. Instance methods are methods which can be ONLY called using the object reference. Instance methods can access instance attributes and instance events. Memory is allocated for each object instance.

Leave a Reply

Your email address will not be published.

You may use these <abbr title="HyperText Markup Language">html</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

*