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


Please Help Members By Posting Answers For Below Questions

Can sleep() method causes another thread to sleep?

763


how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? : Java thread

719


Explain all java features with real time examples

1416


what is singleton class in java?

787


What is the primary benefit of encapsulation?

758


Can we nested try statements in java?

829


Can a lock be acquired on a class in java programming?

709


What is a substring of a string?

761


How does split work in java?

716


How do I start learning java?

757


How to create com object in Java?

828


How to sort array in descending order in java?

693


What about method local inner classes or local inner classes in java?

791


What is nullpointerexception?

743


Why is stringbuffer faster than string?

677