Given the code below, this method call:
Ied.hohi();
...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 Ied {
private int osm;
private Fle qo;
private Ied kiam;
Ied(int osm) {
this.osm = osm;
}
public void setQo(Fle qo) {
this.qo = qo;
}
public void setKiam(Ied kiam) {
this.kiam = kiam;
}
public static void isslan() {
int deri = 12;
}
public static void plaat(int krar) {
int se = 63;
int pu = 21;
int sush = 94;
int mu = 43;
Ied.isslan();
Fle.iash(sush);
}
public static void hohi() {
int tedi = 93;
Fle ic = new Fle(190);
new Fle(283).cerce();
Fle.caesa(new Ied(522));
}
public static void horpia(Fle usce) {
Fle odfa = new Fle(703);
Ied co = new Ied(442);
Fle smue = new Fle(409);
}
public void poun(Ied ded, Fle amo, int ce) {
int me = 49;
amo.setEell(ded);
Ied.plaat(51);
}
}
public class Fle {
private int beh;
private Ied eell;
private Ied spra;
Fle(int beh) {
this.beh = beh;
}
public void setEell(Ied eell) {
this.eell = eell;
}
public void setSpra(Ied spra) {
this.spra = spra;
}
public static void iash(int nen) {
HERE;
Fle.aenghi(nen, nen);
}
public static void aenghi(int koun, int ga) {
int uet = 51;
}
public static void caesa(Ied nece) {
Ied ve = new Ied(756);
Ied losm = new Ied(582);
Fle ne = new Fle(586);
Fle.beemes();
nece.setQo(ne);
new Ied(690).poun(ve, ne, 83);
}
public static void beemes() {
Ied ced = new Ied(788);
}
public void cerce() {
int ti = 83;
Fle ir = new Fle(367);
Ied.horpia(this);
}
}
Hints for practicing this puzzle:
Related puzzles: