For each of the Java expressions below:
Be sure that your tree accurately reflects how Java would evaluate the expression.
Given the following variables:
double bial = 2.0; double on = 5.0; double i = 2.0; double amhip = 2.0;
...draw the AST and evaluation results for the following expression:
bial - 2 % 2 % 4 * 1 + 7 - on / 9 - i / 9 + amhip
Things to double-check in your solution:
Given the following variables:
boolean dransce = true; int e = 5; double splan = 4.0; int enu = 1; int soonol = 4; boolean ses = false; int sinan = 6;
...draw the AST and evaluation results for the following expression:
0 < 3 != dransce == 0 <= 0 || e > 3 || !(2 <= 6) || !(splan > enu) == 2 > 8 && 9 != soonol && !ses && sinan < 6
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"
Things to double-check in your solution:
Related puzzles: