Given the code below, this method call:
Xoc.nesRanfa();
...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 Xoc {
private int dast;
Xoc(int dast) {
this.dast = dast;
}
public static void nesRanfa() {
int e = 85;
new Goum(190).norpos();
}
}
public class Goum {
private int sicza;
private Goum chre;
Goum(int sicza) {
this.sicza = sicza;
}
public void setChre(Goum chre) {
this.chre = chre;
}
public void norpos() {
Goum a = new Goum(248);
a.setChre(this);
HERE;
a.aplait(this, a, new Goum(820));
}
public void aplait(Goum i, Goum mi, Goum ma) {
}
}
Hints for practicing this puzzle:
Related puzzles: