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 e = 2.0; int tasac = 5; int ad = 2;
...draw the AST and evaluation results for the following expression:
5 % e - 6 * 5 / tasac * 3 - 1 % ad / 7
Things to double-check in your solution:
Given the following variables:
int nir = 7; boolean sceck = true; boolean wordes = false; int soron = 1; int whedfric = 9; int langs = 6; int ro = 3; double ie = 1.0; boolean giang = false;
...draw the AST and evaluation results for the following expression:
nir > 7 || sceck == wordes || soron > whedfric && 1 != 3 && langs <= ro && ie > 6 != giang
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: