Consider:
public SomeClass implements SomeInterface{...} SomeClass obj = new SomeClass(); SomeInterface x = obj;
I am trying to associate line 3 with my simplest understanding of memory management. I know that the memory location represented by "obj" just contains a pointer to the SomeClass memory location. Assuming I'm using a 64-bit JVM, then up to 64 bits are allocated for the obj pointer. What is created in memory when the JRE implements x? Is this just a 64-bit pointer to SomeClass?
source share