1 / 7

Animation of CallerAndCallee (1/7)

Data. j. 100. ?. ?. ?. i. ?. i. ?. d. method stack. Animation of CallerAndCallee (1/7). inc1(2 * 50);. System.out.println( ++i );. System.out.println(++i);. 101. 100. 101. callee: 101. Data. j. 100. i. ?. ?. ?. ?. i. ?. ?. ?. i. ?. d. method stack.

tamma
Download Presentation

Animation of CallerAndCallee (1/7)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data j 100 ? ? ? i ? i ? d method stack Animation of CallerAndCallee (1/7) inc1(2 * 50); System.out.println(++i); System.out.println(++i); 101 100 101 callee: 101

  2. Data j 100 i ? ? ? ? i ? ? ? i ? d method stack Animation of CallerAndCallee (2/7) inc1(i = 100); inc1(i = 100); System.out.println(++i); System.out.println(++i); System.out.println(i); 101 101 100 100 callee: 101 caller: 100 100

  3. Data j 100 ? ? ? ? i ? ? ? i ? d method stack i Animation of CallerAndCallee (3/7) i = inc3(i = 100); i = inc3(i = 100); i = inc3(i = 100); System.out.println(++i); System.out.println(++i); return i; System.out.println(i); 101 100 101 101 callee: 101 caller: 101 101 100

  4. Data j 100 ? Data i 100 ? ? ? d ? ? d ? i ? d method stack Animation of CallerAndCallee (4/7) inc4(d = new Data()); inc4(d = new Data()); inc4(d = new Data()); System.out.println(++d.i); System.out.println(++d.i); System.out.println(d.i); 101 101 callee: 101 caller: 101 101

  5. Data d j 100 ? Data Data i i 100 100 ? ? ? d ? ? ? i ? d method stack Animation of CallerAndCallee (5/7) inc5(d = new Data()); inc5(d = new Data()); inc5(d = new Data()); d = new Data(); d = new Data(); System.out.println(++d.i); System.out.println(++d.i); garbage System.out.println(d.i); 101 101 100 callee: 101 caller: 100

  6. Data d j 100 ? Data Data i i 100 100 ? ? ? d ? ? ? i ? d method stack Animation of CallerAndCallee (6/7) d = inc6(d = new Data()); d = inc6(d = new Data()); d = inc6(d = new Data()); d = inc6(d = new Data()); d = new Data(); d = new Data(); System.out.println(++d.i); System.out.println(++d.i); return d; System.out.println(d.i); 101 101 101 callee: 101 caller: 101

  7. Data j 100 ? ? ? ? ? ? i ? d method stack Animation of CallerAndCallee (7/7) inc7(); System.out.println(++Data.j); System.out.println(++Data.j); 101 System.out.println(Data.j); 101 101 callee: 101 caller: 101

More Related