7.3_Applying the static Keyword Flashcards
1
Q
What does the static methods/variable means?
A
static methods don’t require an instance of the class. They are shared among all users of the class.
2
Q
Static methods are also known as?
A
Utility or Helper methods
3
Q
What are the two main purposes of static methods?
A
- > Eliminates the need for the caller to instantiate an object just to call the method.
- > To share state by all instances of a class