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 eamel = 4.0; int ec = 3; double dre = 1.0; int ro = 4; double ma = 3.0;
...draw the AST and evaluation results for the following expression:
eamel % ec % dre / 2 / 3 - ro / ma / 3 * 0
Things to double-check in your solution:
Given the following variables:
double a = 3.0; int noid = 7; boolean mecpa = false; boolean prisos = true; int pe = 7; int niss = 8; int phast = 5; boolean noss = true;
...draw the AST and evaluation results for the following expression:
5 != a == (2 == noid) == mecpa && prisos != 9 >= 0 == pe > niss != phast < 8 && noss
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: