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 as = 9; double dac = 3.0; double noss = 1.0;
...draw the AST and evaluation results for the following expression:
(as * dac) + 0 - noss - 8 - 2 + 7
Things to double-check in your solution:
Given the following variables:
boolean el = false; double be = 5.0; int mared = 4; double sqad = 5.0; int ondres = 5; int swe = 5;
...draw the AST and evaluation results for the following expression:
5 == 2 == el == 3 <= be || mared >= 3 == (4 != sqad) != (ondres == swe)
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: