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 |
can u give one sinario when you use Abstract Class and When you use Interface.
define System.out.println(); what is the meaning!
How do you reverse sort a list in java?
What are static blocks and static initalizers in java ?
What kind of variables a class can consist of?
What is the locale class in java programming?
different between exception and error? explaim check and uncheck exception
Why do we use threads in java?
Hi, This is ravi i have a question like this i have string "UNDERSTAND" now i want to count the letters how many times it occures.i.e from the above string the out put should be like this U-1,N-2,D-2,E-1,R-1,S-1,T-1,A-1. how can i achieve this Thnaks in advance for your response ..
Inorder to specify a container?s layout, which method is used?
What is an empty string in css?
what is mutability?which one is mutable String or StringBuffer?and why?give examples of each which shows the mutability of each String or StringBuffer