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 on = 5.0; int boting = 8; double hechof = 3.0; int hiales = 3;
...draw the AST and evaluation results for the following expression:
8 / on + boting - 1 / hechof - 6 + 1 * 9 + hiales
Things to double-check in your solution:
Given the following variables:
double stoiss = 2.0; int celas = 2; int irdha = 6; boolean paspa = false; int ilt = 1; boolean io = true; boolean neprism = false; int egtar = 3; double apra = 5.0;
...draw the AST and evaluation results for the following expression:
stoiss == 0 == !(celas < irdha) == !paspa == (ilt != 7) == io && !neprism && egtar >= 3 == (5 == apra)
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
Things to double-check in your solution:
Related puzzles: