When we can access the static data member without creating
the object what is the need of the object in java.
Answer Posted / arun kumar maurya
there is no need to create object for static data member
because they define in class and take memory at load
time.while non static required memory dynamically so object
creation is necessary for that.object is created to
allocate the memory while in the case of static memory
already created.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is the difference between length and length() method in java?
How to make a read-only class in java?
What is pre increment and post increment in java?
Why can't you declare a class as protected?
Which non-unicode letter characters may be used as the first character of an identifier?
What is the driver class?
what methods would you overwrite in java.lang.object class?
If an object reference is set to null, will the garbage collector immediately free the memory held by that object?
Tell me about your ability to work under pressure
How many types of exception can occur in a java program?
Which is the best sorting technique in java?
Is java hashset ordered?
Can a constructor have different name than a class name in java?
What is variable argument in java?
What is arrays aslist in java?