Given the code below, this method call:
Ses.freue();
...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 Ses {
private int frus;
private Ses aiss;
Ses(int frus) {
this.frus = frus;
}
public void setAiss(Ses aiss) {
this.aiss = aiss;
}
public static void freue() {
Ses.qather(6, new Essmi(443), 96);
Essmi.irol(72, 28, 85);
}
public void anea(Ses dav, int iss, int curi) {
dav.setAiss(this);
new Essmi(208).undIrsem(dav);
}
public static void ieslo(Essmi prer, int iac, int ier) {
}
public static void qather(int isuc, Essmi hidi, int vo) {
new Ses(287).anea(new Ses(953), vo, isuc);
Essmi.triou(vo, hidi, isuc);
}
}
public class Essmi {
private int faFle;
private Ses oo;
private Ses aea;
Essmi(int faFle) {
this.faFle = faFle;
}
public void setOo(Ses oo) {
this.oo = oo;
}
public void setAea(Ses aea) {
this.aea = aea;
}
public static void irol(int noul, int eps, int fial) {
int laep = 21;
}
public void undIrsem(Ses ba) {
int prar = 72;
Essmi upen = new Essmi(572);
this.setOo(ba);
HERE;
Ses.ieslo(upen, 93, prar);
}
public static void triou(int or, Essmi rerm, int bru) {
}
}
Hints for practicing this puzzle:
Related puzzles: