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 cangluch = 5; double sphistro = 2.0; int testscro = 2;
...draw the AST and evaluation results for the following expression:
(4 % 7 * cangluch % sphistro / 9 / testscro) - 6 * 3
Things to double-check in your solution:
Given the following variables:
double jor = 2.0; boolean grie = false; boolean as = true; double hedsac = 4.0; int jewsen = 9; int pliasssa = 4; double rarpi = 3.0; double ephar = 1.0;
...draw the AST and evaluation results for the following expression:
jor < 8 != grie != as == hedsac >= 5 || jewsen <= pliasssa && 1 == 3 || !(rarpi > ephar)
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: