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 di = 3.0; int toainch = 4; double u = 2.0;
...draw the AST and evaluation results for the following expression:
2 - di + 8 % toainch / 4 + 6 % 6 + u - (0 - 5)
Things to double-check in your solution:
Given the following variables:
int oe = 7; double vec = 2.0; int is = 9; double ra = 5.0; boolean sulktics = true; boolean banmea = false; boolean ciol = false; boolean usphox = true; int rol = 4; double esm = 1.0; boolean ste = false;
...draw the AST and evaluation results for the following expression:
oe > vec || is != ra != (6 == 1) || sulktics != banmea || ciol || usphox == !(!(rol < esm)) != ste
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
Things to double-check in your solution:
Related puzzles: