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 loteld = 8; int to = 8; int ba = 4; int el = 5; int andbe = 7;
...draw the AST and evaluation results for the following expression:
loteld / 1 - to * ba + 7 * el - 4 / 7 % 6 - 3 - 9 * andbe
Things to double-check in your solution:
Given the following variables:
double oanien = 2.0; double kentiosk = 3.0; int iafo = 9; int gren = 3; double prewllol = 4.0; boolean i = true; boolean siec = false; int cemsu = 8; double cror = 1.0; boolean ol = false;
...draw the AST and evaluation results for the following expression:
oanien != 7 == (2 <= kentiosk == 3 >= iafo && 1 < gren == 0 <= 3 != (prewllol != 6)) != !i == siec || cemsu != cror || ol == (!(6 != 0))
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" + 11 + 12
Things to double-check in your solution:
Related puzzles: