wood burning stoves 2.0*
The moose likes Java in General and the fly likes Difference between an Object and Instance. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Difference between an Object and Instance." Watch "Difference between an Object and Instance." New topic
Author

Difference between an Object and Instance.

Arav Kumar
Greenhorn

Joined: May 27, 2008
Posts: 14
Hi to all Ranchers,

Please explain what is the difference between an Object and Instance, If they are same then why we have different terminologies.

Regards
Arav Kumar.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36514
    
  16
Please do a search; that question is asked frequently.

An "instance" should really be "an instance of class Foo" which means an object whose type is "Foo". So the two are very similar. An "object" could have any type.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19544
    
  16

Also, an Object (with capital O) is an instance of class java.lang.Object.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36514
    
  16
But all objects are Objects, not like in Eiffel where all objects are Generals and Anys.
Embla Tingeling
Ranch Hand

Joined: Oct 22, 2009
Posts: 237
Arav Kumar wrote:Please explain what is the difference between an Object and Instance, If they are same then why we have different terminologies.


An object is a class instance or an array.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference between an Object and Instance.
 
Similar Threads
difference btwn Object and Instance
object Vs instance
Creation of EJBObject class
Related to Object
Difference between Object and Instance