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 vung = 3.0; int banschic = 1; double traciss = 1.0; int piri = 7; double lardpar = 2.0; double ontra = 5.0;
...draw the AST and evaluation results for the following expression:
vung + banschic % traciss * piri + (lardpar * ontra)
Things to double-check in your solution:
Given the following variables:
double bix = 4.0; int dockna = 3; int espim = 9; int ce = 2; double brar = 4.0; double proass = 5.0;
...draw the AST and evaluation results for the following expression:
bix == dockna || espim > 9 != ce <= 0 || (brar > proass || !(1 == 9))
Things to double-check in your solution:
Draw the AST and evaluation results for the following expression:
0 + (1 + 2 + 3 + 4 + "5" + 6)
Things to double-check in your solution:
Related puzzles: