Memory Allocated to object method vs thread method in java

When a Java thread calls a method, the method call is stored in stack memory. But, when same thread calls a method with ObjectReference, which memory is used by object method? How the flow works?

public static void main(String args[])//main will go to stack of main thread
{
  Object obj=new Object(); //obj ref will go to stack of main thread
  obj.foo(); //foo will go to which memory stack or heap?
}