+ 2

[DUPLICATE] Why we use static method in java?

2nd Jan 2018, 3:55 AM
tarun
tarun - avatar
2 Answers
+ 10
The static modifier tells the compiler that the corresponding member belongs to the class itself and not to instances of the class. This means that there will only be one copy of that member, no matter the amount of instances of the class which has been declared. Please consider: https://www.sololearn.com/discuss/946142/?ref=app https://www.sololearn.com/discuss/916960/?ref=app https://www.sololearn.com/discuss/703955/?ref=app
2nd Jan 2018, 4:45 AM
Hatsy Rei
Hatsy Rei - avatar