answersLogoWhite

0

Difference between instance and object

Updated: 8/9/2023
User Avatar

Gutsy

Lvl 1
11y ago

Best Answer

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..

For user defined classes, object and instances are same.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

an object (of that class). The class itself is like a blueprint of a style of house, an acutual house built from that blueprint is an instance of that perticular style. When you have 2 identical house built side by side, physically they are the same, but on 2 different locations (in computer term, 2 different memory addresses)

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

A typical "example".

For instance, the computer your are using to view this answer is just an instance of (the class Personal Computer), there maybe an "identical" setup (software and hardware components) out there as yours, yet, the "identification tag" (in some object-oriented languages it's called Object Identity) are different.

Another way to look at this: Class provides the abstraction, the instance of that class provides the realization of that abstraction. A human is an abstraction, and you are a realization of a human (an instance of human, but not the human class itself), a typical example of a human.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

An instance is the occurrence of anything, an example put forward, an urgency in speech or action. An object is a thing that is visible or tangible

This answer is:
User Avatar

User Avatar

Wiki User

10y ago

You define a class, then you create objects based on the class. This makes the class the "template" for the objects; while the individual objects are "instances" of the class.

This answer is:
User Avatar

User Avatar

Wiki User

15y ago

An Object

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Difference between instance and object
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between classes and object in C?

An object is an INSTANCE of a class. Human is a class, while YOU are a person, an instance of Human class, but YOU do not represent the entire human class. Or, a class provides the abstraction, and an object is a typical example of that abstraction. Classes provide a blue print to build a real instance of an object.


What is the Difference between relation schema and relation instance?

difference between relation sehema and relation instance in dbms


What is the difference between a class method and object in object-oriented C?

Class methods are the member functions that act upon member variables. An object is an instance of a class. C does not support object-oriented programming, but C++ does.


What is difference between an instance variable and a class variable?

An instance variable is typically associated with an object instance of the class whereas class variable is not associated with any object instance. Static variables are referred to as class variables while non-static regular variables are called instance variables. Simply put, you will have as many instances of the instance variable as there are object instances. i.e., if there are 10 instances of an object, you will have 10 instances of that instance variable as well. But, there will be only one instance of the static or class variable. Instance variables are accessed as follows: objname.variableName; Class variables are accessed as follows: ClassName.variableName;


What is the difference between an object's speed and a object's velocity?

The difference between an object's speed and an object's velocity is that the object's speed is how fast it is going, and the object's velocity is how many units of speed the object has traveled.


What is the difference between a form file object and a windows form object?

difference between a form file and a form.


difference between tripitaka and jataka?

[object Object]


What is the difference between force and tension?

[object Object]


What is the difference between direct object and object?

a direct object is your mum


WHAT IS BETWEEN MATTER AND MATTER?

Well, in one instance matter is the atoms making up every object on Earth and beyond it, measured by mass, volume, and density. In another instance, things that matter are things that are important. There is a large difference between the meaning of the words.


What is the difference between nature miracles and healing miracles?

What is the difference between nature miracle and healing miracle


What is the difference between instantiation and initialization in C plus plus?

Instantiation is creating the instance of the variable/object . While Initialization is to provide the variable with some value. int i; // i is an instance of an integer i=10; //initialised with the value 10