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 erpse = 8; double wa = 2.0; int o = 6; double roem = 3.0;
...draw the AST and evaluation results for the following expression:
erpse - wa / 3 / o + 9 + roem
Things to double-check in your solution:
Given the following variables:
double clen = 1.0; boolean u = true; double ic = 1.0; int vu = 4;
...draw the AST and evaluation results for the following expression:
clen == 1 || u || (3 <= ic != 6 >= 2) == (1 == vu)
Things to double-check in your solution:
Draw the AST and evaluation results for the following expression:
(0 + 1 + 2 + 3 + 4 + 5) + "6"
Things to double-check in your solution:
Related puzzles: