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 cio = 3.0; double seasna = 3.0; int eoc = 2;
...draw the AST and evaluation results for the following expression:
1 - cio - 2 % seasna / 3 - 0 - eoc * 0
Things to double-check in your solution:
Given the following variables:
boolean da = true; int ka = 1; int luss = 6; double sqen = 5.0; int chliantta = 9; double priono = 3.0; boolean gri = false;
...draw the AST and evaluation results for the following expression:
da || ka > 5 == 6 > luss != (2 != 7) != sqen >= chliantta && 2 > priono || gri
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"
Things to double-check in your solution:
Related puzzles: