Hay all,

I have a question i've wondered about for about a year or so now. I'd be most greatful if anyone could help me with it. It may sound strange but here goes :

In Java (and probs some other object oriented languages) you have Object as the base class and can accept Object types into a method for "stuff" to be done with them. I know Object represents other types of objects that extend from it, but how (at a low level) does the JVM keep track of this ? I mean if it has the pointers to data held in an Object where does it magically get the extra data pointers from when it is cast back into its real object type ?

Hope that made some sort of sense,

Any help would be great,

Cheers