When we can access the static data member without creating
the object what is the need of the object in java.
Answer Posted / viswa
The question is "when we can access the static data member
with out creating object?
To access a static member of data we no need to create an
object, using class name we can access that static data member.
What is the need of the object in java?
Object is required to access the instance variables as well
as instance methods in the class.With out the object we
can't access them.
| Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
Can I override protected method in java?
What super () does in java?
Why stringbuilder is not thread safe?
Can we call a non-static method from inside a static method?
Describe different states of a thread.
when you will synchronize a piece of your code? : Java thread
How does queue work in java?
What is a final class ?
What are functions in java?
What is the difference between hashmap and hashtable? What is an interface?
What is a protected void?
In which order the iterator iterates over collection?
What is the difference between menuitem and checkboxmenu item?
Explain inheritance in java?
What is the difference between path and classpath variables?