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.









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
instance varaiable
instance varaiable  if we create a class which has two instance variable but don't create object of that class then what is called that instance variable??? bcoz they didn't allocate memory
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
instance variables - Java Beginners
instance variables  instance variables
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
Explain instance in java - Java Interview Questions
Explain instance in java  Hi Friends, can you explain instance in java. In general instance means "occurence of something" . In java what is instance
about instance of java
about instance of java  1> what is an instance 2> what is an object 3>what is difference between above two   Hi Friend, An Instance creates the reference of an object. An object is a run time entity
What is a tuple?
What is a tuple?  What is a tuple?   hi, A tuple is an instance of data within a relational database.ADS_TO_REPLACE_1 Thanks
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
Difference between object and instance? - Java Beginners
Difference between object and instance?  What is the difference between object and instance in java
add a property to instance variable
add a property to instance variable  How to add a property to instance variable in iPhone SDK
static & instance - Java Beginners
static & instance  what is different between static variable and instance variable .? plz explain with example. and when we can use static variable and when can use instance variable.    public class Main
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
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
unrecognized selector sent to instance
in xcode. unrecognized selector sent to instance   This kind
ModuleNotFoundError: No module named 'single-instance'
ModuleNotFoundError: No module named 'single-instance'  Hi, My... named 'single-instance' How to remove the ModuleNotFoundError: No module named 'single-instance' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'instance-config'
ModuleNotFoundError: No module named 'instance-config'  Hi, My... named 'instance-config' How to remove the ModuleNotFoundError: No module named 'instance-config' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'jsonschema-instance'
ModuleNotFoundError: No module named 'jsonschema-instance'  Hi, My... named 'jsonschema-instance' How to remove the ModuleNotFoundError: No module named 'jsonschema-instance' error? Thanks   Hi
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, (adsbygoogle
creating instance of table in jsp
creating instance of table in jsp  i face senario look kie as follows; 1)i write a code in jsp to retrieve the data from database. 2)the out put... to make the instance of the data present in that paarticular table.... how i do
No action instance for path
No action instance for path  <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %> <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> <html:html locale="true">
what is bit
what is bit  what is bit
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 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
What is Hibernate  Hi, What is Hibernate? Thanks
What is Hibernate
What is Hibernate  Hi, What is Hibernate? Thanks
What is Hibernate
What is Hibernate  Hi, What is Hibernate? Thanks
What is JDBC?
What is JDBC?  What is JDBC
What is FBT
What is FBT   hello, What is FBT
What is ActionServlet?
What is ActionServlet?  What is ActionServlet
What is Trigger?
What is Trigger?  What is Trigger
What is VLR ?
What is VLR ?  hii, What is VLR
What's PHP ?
What's PHP ?  What's PHP
What is an interface?
What is an interface?  What is an interface

Ads