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 se = 2; double galvi = 3.0; double guree = 4.0; double aggrel = 3.0; double mii = 4.0; double i = 4.0;
...draw the AST and evaluation results for the following expression:
9 + 4 - se + 4 * (galvi - 6 + guree + aggrel * 8) % 2 % mii % i
Things to double-check in your solution:
Given the following variables:
double plommoos = 4.0; boolean sti = true; int ughtchi = 5; int esthack = 6; int we = 3; int untcoss = 5; boolean sopis = true; int clen = 9; boolean puhe = true; boolean asmkan = false;
...draw the AST and evaluation results for the following expression:
!(3 < 9) || 4 >= plommoos || sti || (ughtchi < esthack || 9 > 7 != !(we >= untcoss) == 2 > 3 && sopis || !(9 <= clen)) && puhe != asmkan
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 + 9 + 10 + "11" + 12
Things to double-check in your solution:
Related puzzles: