+ 1
About static method in java
What is the best scenario when using a static method in java since it changes all the value that you just instantiated with that class? Thank you...
1 Resposta
0
If you don't want to add any class except main class and you don't want an object, you are not using any oops concepts but you want to add some method in the main class, then static method is used. This is one scenario for beginners.
Another cases includes when you want something to have only one value at a time and you don't want to waste memory then static method can be used. There are so many uses....