java - stack and heap diagram of method that is assigned to reference variable -


how draw stack , heap diagram of following code:

ball b1; ball b2 = new ball(); ball b3 = new ball(); b1= dothing(); b3 = dothings(); 

i know call methed (e.g dothing()) in stack. how relate b1 (which in stack dothing()). should create object in heap them?

all java-ojbect created in heap. if dothing() instantiate ball should create object in heap them on diagram.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -