InterviewSolution
Saved Bookmarks
| 1. |
What is the purpose of static methods and variables? |
|
Answer» The class's static methods or VARIABLES are SHARED by all of the class's objects. The static property belongs to the class, not the OBJECT. We don't need to BUILD the object to access the static variables because they're stored in the class area. As a result, static is UTILISED when we need to create variables or methods that are shared by all of the class's objects. |
|