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

Change php variable from jquery value using ajax (same page) -

How can I fetch data from a web server in an android application? -

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