File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes instance vs object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "instance vs object" Watch "instance vs object" New topic

instance vs object

kiran nyala
Ranch Hand

Joined: Sep 21, 2009
Posts: 50

how we can differ instance, object and reference ?
Monu Tripathi

Joined: Oct 12, 2008
Posts: 1369

Class is an idea of a structured data. Objects are manifestations of this structure in memory. And references are unique handles to these objects in memory.

[List of FAQs] | [Android FAQ] | [Samuh Varta]
Nicola Garofalo
Ranch Hand

Joined: Apr 10, 2010
Posts: 308
An object is an instance of a class

From a class you can create many objects, many instances of that class.

A reference is a variable that can refer to an object.

Here's a link to the java tutorial. It's a good beginning

It is sorta covered in the JavaRanch Style Guide.
subject: instance vs object
It's not a secret anymore!