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 synchronization? : Java thread
Can we sort hashmap in java?
Write a program to check for a prime number in java?
What is java jit compilers?
What is a boolean flag in java?
Explain some best practices you would apply while using collection in java?
What are the data types supported by java? What is autoboxing and unboxing?
What is difference between protected and private?
What is data object example?
What does regex mean?
What is array and arraylist in java?
What is the diffrence between inner class and nested class?
Can we define constructor in inner class?
What are parsers? Dom vs sax parser.
What is the difference between checked exception and unchecked exception?