What is the difference between Object and Instance?

Answers were Sorted based on User's Feedback



What is the difference between Object and Instance?..

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

What is the difference between Object and Instance?..

Answer / titupathirao

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

What is the difference between Object and Instance?..

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

What is the difference between Object and Instance?..

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

What is the difference between Object and Instance?..

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

Post New Answer

More Core Java Interview Questions

extending thread class or implementing runnable interface. Which is better? : Java thread

0 Answers  


How to display all the prime numbers between 1 and 100

0 Answers  


What are serialization and deserialization?

0 Answers  


Explain about the select method with an example?

0 Answers  


Given: 10. interface A { void x(); } 11. class B implements A { public void x() { } public voidy() { } } 12. class C extends B { public void x() {} } And: 20. java.util.List list = new java.util.ArrayList(); 21. list.add(new B()); 22. list.add(new C()); 23. for (A a:list) { 24. a.x(); 25. a.y();; 26. } What is the result? 1 Compilation fails because of an error in line 25. 2 The code runs with no output. 3 An exception is thrown at runtime. 4 Compilation fails because of an error in line 20.

3 Answers  


What is anagram of a string?

0 Answers  


Difference between flush() and commit() in hibernate?

2 Answers   Bally Technologies,


What is navigable map in java?

0 Answers  


What is a resource leak ?

1 Answers  


Howmany number of objects we can store in an ArrayList. Is there any limit?

7 Answers   TCS,


Difference between abtsract & final

1 Answers   Nous,


What are the various access specifiers in java?

0 Answers  


Categories