What’s the purpose of Static methods and static variables?
When there is a requirement to share a method or a variable between multiple objects of a class instead of creating separate copies for each object, we use static keyword to make a method or variable shared for all objects.
No comments:
Post a Comment