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 stranio = 2.0; int cidish = 4; double sprar = 3.0; double im = 4.0; int apriod = 3;
...draw the AST and evaluation results for the following expression:
8 * stranio - cidish - sprar % 7 % im + apriod
Things to double-check in your solution:
Given the following variables:
double fre = 5.0; int ti = 9; int aimast = 6; double revou = 1.0; int strasmiat = 4; int biarpre = 7;
...draw the AST and evaluation results for the following expression:
1 <= fre == ti < aimast && (4 > revou || 9 != 9 || strasmiat > 8 != 4 < biarpre)
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)
Things to double-check in your solution:
Related puzzles: