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 ga = 6; double acon = 3.0; double be = 5.0; double erpaud = 5.0; double bli = 4.0; int hu = 5; double stoflut = 2.0;
...draw the AST and evaluation results for the following expression:
ga - acon / be - (erpaud * bli - hu) + stoflut
Things to double-check in your solution:
Given the following variables:
int trosi = 4; boolean vossci = false; double e = 4.0; int ingclie = 9; boolean cec = true;
...draw the AST and evaluation results for the following expression:
4 == 9 == !(7 >= trosi) && 3 < 5 || vossci && !(e >= ingclie) || cec
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"
Things to double-check in your solution:
Related puzzles: