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 fihphir = 8; int sotsia = 4; double moen = 1.0; double fa = 4.0; int egemp = 7;
...draw the AST and evaluation results for the following expression:
fihphir + 0 - (1 % sotsia % moen + 3 / 2 * 8 - fa) + egemp
Things to double-check in your solution:
Given the following variables:
double e = 2.0; double spim = 3.0; boolean ris = true; int a = 9; double po = 3.0; boolean is = false; double kretin = 1.0;
...draw the AST and evaluation results for the following expression:
e == 8 == (spim > 7 && ris && !(6 > 9)) == 9 <= 4 && !(1 == 7) == a <= po == is || 8 != kretin
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: