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 ec = 6; int bi = 5; double humb = 2.0; double ior = 5.0; int ta = 4;
...draw the AST and evaluation results for the following expression:
ec * bi * humb / 1 % ior * 5 % 1 - ta
Things to double-check in your solution:
Given the following variables:
boolean plidtho = false; boolean terpo = true; double rintri = 1.0; int soswe = 7; double un = 2.0; boolean hifo = false; boolean rimsi = true;
...draw the AST and evaluation results for the following expression:
plidtho && terpo || rintri <= 2 != (soswe == un) && hifo || !rimsi == 7 < 3
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: