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 gadtur = 3; int kont = 3; double doti = 5.0; int miabis = 4;
...draw the AST and evaluation results for the following expression:
3 + gadtur - kont % 9 % 5 - (9 * doti * miabis) + 6
Things to double-check in your solution:
Given the following variables:
int ithsent = 6; double ba = 2.0; int lird = 9; int cron = 4; boolean edmar = true; int i = 7; boolean cinru = true; int riongsstres = 8; double chrothprong = 2.0;
...draw the AST and evaluation results for the following expression:
ithsent == 1 && 3 < ba || 4 != 1 && lird == cron == edmar == 2 >= i || cinru && riongsstres != chrothprong
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
Things to double-check in your solution:
Related puzzles: