Music, asked by vinodcse92541, 10 months ago

What is the purpose of static methods and variables?

Answers

Answered by yomisma1517
0

Answer:

For utility or helper methods that don't require any object state

Explanation:

When we want the variable or function value to be shared between all instances of the class ,we can declare the variable or method to be static. Also static variable are associated with a class rather than particular objects so they are assigned value once and remains the same throughout the lifetime.

Similar questions