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
What is the difference between equals() and?
What is http client in java?
Why synchronization is important in java?
How big is a pointer?
What is the replace tool?
Can list have duplicates in java?
How concurrent hashmap works?
Can you give few examples of final classes defined in java api?
What is ‘has a’’ relationship in java?
What is hashtable and explain features of hashtable?
What is oops in java?
What is difference between wait and notify in java?
What is the gregoriancalendar class in java programming?
What is module with example?
What is the difference between preemptive scheduling and time slicing in java programming?