What is the difference between Object and Instance?
Answers were Sorted based on User's Feedback
Answer / siva
instance means non-static variables memory location. Object means non-static variables + non-static methods memory location
| Is This Answer Correct ? | 11 Yes | 1 No |
For example, if I declare a class like
Animal a=new Animal();
Is variable 'a' in above is an instance which has an object of Animal type?
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / subba reddy
object means.
just create variable for class this is also called reference.
instance means.
create object for the class using new operator or new instance .
| Is This Answer Correct ? | 2 Yes | 3 No |
Answer / nagarjuna
Object is the creating memory location by using new operator
Instance is the creating the reference.
| Is This Answer Correct ? | 1 Yes | 4 No |
Answer / srinivaskumar.nimmana
All objects except array object are instances,i.e every object except array object can be instance but every instance may not be object.
| Is This Answer Correct ? | 1 Yes | 6 No |
watz the difference between abstract class and interface? Which one u ill choose as a designer?
How to make a non daemon thread as daemon?
What is the difference between throw and throws? What is the similarity between try and throw?
What are the application of stack?
Java openings 3 - 5 years, Lnt Infotech. requirements - core java, J2ee, struts, hibernate Interview Date:- 19 March 2011 Time:- 9:00 AM to 12:00 Pm Interview Location - L & T Infotech, Manapakkam, Chennai Refererral PS NO:- 291649 (Please mention this when u fill the form only then u will be considered for interview) Documents Required:- Latest Resume, Photograph and last 3 payslips Mail me on vasan2211@gmail.com once u appear for interview
Difference between Hash Table and Hash Map?
How will you calculate the depth of a binary tree if the tree contains 15 nodes?
In treeset we add same object ...what will be the out put
Is map sorted in java?
what is difference between requestprocessor and request dispatcher?
What is the difference between class forname and new?
how many access specifiers are available in java