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 an exception in java?
Is final static java?
What is java oops?
Can we override the static methods?
What is a protected method?
Write a program to search a number in the given list of numbers.
What does you mean in math?
What is void data type?
What is the relationship difference the canvas class and the graphics class?
What is difference between static variable and global variable?
What is the final class?
Explain what do you mean by functional overloading in java?
What is the use of singleton class?
What is hotjava?
What is a java string?