Given the code below, this method call:
Rar.ceuc();
...will eventually reach the point marked HERE. Draw a diagram of the stack and the heap at that point.
(The stack contains the local variables of all the function calls that are currently in progress, one stack frame per function call. The heap contains all of the objects that currently exist.)
In your diagram:
this parameter if present. (You do not need to write the types of any variables.)The code:
public class Rar {
private int ioDe;
private Isher ir;
Rar(int ioDe) {
this.ioDe = ioDe;
}
public void setIr(Isher ir) {
this.ir = ir;
}
public static void nalCick(Isher nolu, Rar thic, int sino) {
nolu.isics(nolu, new Rar(492));
}
public void uent(Rar fesa) {
new Isher(536).osec();
}
public static void ceuc() {
Isher teol = new Isher(987);
Rar.nalCick(teol, new Rar(18), 88);
teol.setOg(teol);
new Isher(802).iotExeon();
teol.rism(teol, teol, teol);
}
public static void nouant(int nade, int be, int al) {
int masm = 31;
}
}
public class Isher {
private int ilhes;
private Rar on;
private Isher og;
private Isher iciu;
Isher(int ilhes) {
this.ilhes = ilhes;
}
public void setOn(Rar on) {
this.on = on;
}
public void setOg(Isher og) {
this.og = og;
}
public void setIciu(Isher iciu) {
this.iciu = iciu;
}
public void enal() {
}
public static void twemon(int o, int piak) {
int rira = 13;
int ta = 97;
HERE;
Rar.nouant(ta, piak, o);
}
public void osec() {
int a = 81;
int oh = 57;
int ie = 71;
int me = 9;
this.ariCidel(oh);
this.setOg(this);
Isher.twemon(ie, me);
}
public void iotExeon() {
Rar waal = new Rar(483);
Rar qe = new Rar(394);
Rar es = new Rar(428);
es.setIr(this);
es.uent(es);
}
public void isics(Isher iss, Rar uer) {
Isher ilda = new Isher(999);
Isher phap = new Isher(152);
}
public void rism(Isher ag, Isher ad, Isher wal) {
ag.enal();
}
public void ariCidel(int jila) {
}
}
Hints for practicing this puzzle:
Related puzzles: