what is an object and how do you allocate memory to it?
Answer Posted / sunitha
It is an instance of class or run time entity which binds
data members and methods together.
example:
car
Attributes(state of the object)
name, no. make , price, mileage.
Methods (Behavior of the object): start, stop,
Accelerate,
By using new operator we can allocate memory to object.
by using constructions we can allocate memory directly
here we no need to use new operator . for deal location of
memory we can use destruction's .
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Explain thread in java?
how can you catch multiple exceptions in java?
Can we inherit inner class?
What is mean by exception?
What is the intersection and union methods?
What are the three types of design patterns?
Why is String immutable?
What is lazy programming?
What is public static?
What is locale?
What do you understand by overloading and overriding in java?
What do you mean by garbage collection used in java?
What is meant by distributed application? Why are we using that in our application?
What is character in data type?
If you do not want your class to be inherited by any other class. What would you do?