what is instance

what is instance

what is the difference between instance and object

View Answers

May 16, 2012 at 12:48 PM

Instance refers to the copy of the object at a particular time whereas object refers to the memory address of the class.

Object - When there is an value.
int[] arr={1,2,3};

Instance - when there is a declaration for class with 'new'.
String arr=new String("test");

A obj2 = new A(); //this is the object instance with occupy memory for this.

Ads









Related Tutorials/Questions & Answers:
what is instance
what is instance   what is the difference between instance and object   Instance refers to the copy of the object at a particular time... there is an value. int[] arr={1,2,3}; Instance - when there is a declaration for class
what is instance
what is instance   what is the difference between instance and object   Instance refers to the copy of the object at a particular time... there is an value. int[] arr={1,2,3}; Instance - when there is a declaration for class
Advertisements
what is instance
what is instance   what is the difference between instance and object   Instance refers to the copy of the object at a particular time... there is an value. int[] arr={1,2,3}; Instance - when there is a declaration for class
what is instance
what is instance   what is the difference between instance and object   Instance refers to the copy of the object at a particular time... there is an value. int[] arr={1,2,3}; Instance - when there is a declaration for class
what is instance
what is instance   what is the difference between instance and object   Instance refers to the copy of the object at a particular time... there is an value. int[] arr={1,2,3}; Instance - when there is a declaration for class
What is instance variable in Java?
What is instance variable in Java?  Hi, What is instance variable in Java? What is the use of instance variable? Thanks   Hi, In Java... which is defined in a class is know as instance variable. This is also know
What are instance variables?
What are instance variables?   Hi, What are instance variables? thanks   Hi, Each object of the class has its own set of values... (instances of the class).Hence these variables are also known as instance variables
what is jvm instance, how is it created, how is related to thread?
what is jvm instance, how is it created, how is related to thread?  what is jvm instance, how is it created, how is related to thread
instance
instance  What is the exact need of declaring a variable as instance
INSTANCE
INSTANCE  PLEASE TELL ME THE EXACT MEANING OF INSTANCE?AND EXPLAIN
Static & Instance variables in java
Static & Instance variables in java  What are the Difference between Static & Instance variables in java
Class and Instance
; public int y=3;} What are the class variable? What are the instance variables? What is the output from the following code: IdentifyMyParts a = new... = " +b.x);   Instance variables are declared in a class, but outside a method
appdelegate instance
appdelegate instance  Hi, How to get appdelegate instance in some other part of the application? Thanks   Hi, Following code can be used to get the instance of Appdelete. MyAppDelegate *appDelegate = (MyAppDelegate
Hibernate instance states.
Hibernate instance states.  Explain the types of Hibernate instance states
export instance sql
export instance sql  How to export instance in sql
what will the output
what will the output  class Parent has a public method play... the method play() that prints "Child is playing". An instance of Child class... = (Parent) sonu; p.play(); What will be the output of above section of code
add a property to instance variable
add a property to instance variable  How to add a property to instance variable in iPhone SDK
Object reference not set to an instance of an object
Object reference not set to an instance of an object  Object reference not set to an instance of an object
How to Create Instance using PHP
How to Create Instance using PHP  Hi, How to create an instance class in PHP program. Can someone explain or suggest any online reference how to create an Instance class in PHP. Thanks
what is bit
what is bit  what is bit
What is procedure
What is procedure  What is procedure in computers? What are the primary categories of procedures
what is hibernate.archive.autodetection
what is hibernate.archive.autodetection  what is hibernate.archive.autodetection? what is autodetection and why it is used
what is hibernate.archive.autodetection
what is hibernate.archive.autodetection  what is hibernate.archive.autodetection? what is autodetection and why it is used
what is hibernate.archive.autodetection
what is hibernate.archive.autodetection  what is hibernate.archive.autodetection? what is autodetection and why it is used
what is hibernate.archive.autodetection
what is hibernate.archive.autodetection  what is hibernate.archive.autodetection? what is autodetection and why it is used
what is hibernate.archive.autodetection
what is hibernate.archive.autodetection  what is hibernate.archive.autodetection? what is autodetection and why it is used
what is hibernate.archive.autodetection
what is hibernate.archive.autodetection  what is hibernate.archive.autodetection? what is autodetection and why it is used
What is Hibernate
What is Hibernate  Hi, What is Hibernate? Thanks
what is collections?
what is collections?  what is collections
what are indices?
what are indices?  what are indices
What is Hibernate
What is Hibernate  Hi, What is Hibernate? Thanks

Ads