For each of the Java expressions below:
Be sure that your tree accurately reflects how Java would evaluate the expression.
Given the following variables:
int esmglud = 4; int peudplod = 2; double pel = 1.0; double o = 5.0; double tir = 4.0; int joatret = 9;
...draw the AST and evaluation results for the following expression:
(esmglud % peudplod % 4) - pel * o * tir % 4 % joatret
Things to double-check in your solution:
Given the following variables:
boolean sti = false; double em = 5.0; int di = 9; boolean omo = true; boolean io = true; boolean trentqen = true; boolean gless = false;
...draw the AST and evaluation results for the following expression:
sti && 0 == em && 8 >= di && omo == io && trentqen != gless
Things to double-check in your solution:
Draw the AST and evaluation results for the following expression:
0 + 1 + 2 + 3 + 4 + "5" + "6" + 7 + 8
Things to double-check in your solution:
Related puzzles: