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
How can you add and remove nodes in jtree?
Java is pass by value or pass by reference? Explain
how a programmer confirms that the data submitted has been succesfully inserted into the database(either oracle or my sql).. How a programmer confirm if there is any problem with the program he wrote for insertion... ANS:--- >executeupdate method is having boolean return type, if anything goes wrong in data insertion or data updation, it would return false. otherwise, if it successfully inserts data into the database, it would return true NOW HOW TO I CHECK IN MY DURING EXECUTION WHETHER IT RETURNS TRUE OR FALSE... WELL IT WILL DISPLAY ANY MESSAGE OR NOT
what is the difference between thread and runnable types? : Java thread
What is the difference between integer parseint and integer valueof?
Explain about the dynamic behavior of core java?
How do I stop concurrentmodificationexception?
How is Object Oriented Programming different from Procedure Oriented Programming?
Is array passed by reference in java?
Differences between C and Java?
what is the purpose of using rmisecuritymanager in rmi?
Is char a data type in java?
Can java program run without jre?
How do you identify independent and dependent variables?
What is a wrapper method?