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 number data type in java?
How do I enable java in safari?
Can a abstract class be declared final?
What is the latest java version?
What is the difference between math floor and math round?
How many threads does a core java have?
Differences between external iteration and internal iteration?
What is hashmap and map?
How to change the priority of thread or how to set priority of thread?
Can a java program have 2 main methods?
What is type parameter in java?
Is it necessary that each try block must be followed by a catch block?
What is a linkedhashmap java?
What is a war file?
What is charat ()?