Let's say we have an instance reference variable assigned to an object.
public class Player {
private Object object = new Object();
}
whenever I create a new Player instance.
Player player = new Player();
As far as I have learned, might be wrong I'm pretty new to this. The heap allocates memory for the instance primitive variables and stores these in the objects.
If it does the same for the instance reference variable which is assigned to an object, doesn't this instantly create a new instance or does this only occur when calling the reference variable?