In Java, what’s the purpose of static methods and static variables?
Answer Posted / nashiinformaticssolutions
When a method or variable needs to be shared across several objects of a class, developers utilize a static keyword to make it shared for all objects. Instead of making unique copies for every object, this is employed.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What happens if constructor is private?
What is <> used for in java?
What is a class variable?
How does sublist works in java?
What is a boolean structure?
What is a short in java?
What is a boolean field?
What are reference variables in java?
Is {a, n, d} a palindrome? If you are given a random string, is it a palindrome or not?
Explain scope or life time of local variables in java?
What are annotations in java?
EDS (Electronic Data Systems India Pvt Ltd) at Chennai on 16-12-2006.
What is __ init __ functions?
Can we execute a program without main?
What is classpath?