in JAVA by
What’s the purpose of Static methods and static variables?

1 Answer

0 votes
by

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.

Related questions

0 votes
asked Oct 17, 2020 in JAVA by rahuljain1
0 votes
asked Oct 17, 2020 in JAVA by rahuljain1
+1 vote
asked Dec 4, 2019 in JavaScript by SakshiSharma
...