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 cisdo = 6; double anen = 5.0; double ra = 4.0; int ipec = 4;
...draw the AST and evaluation results for the following expression:
5 % cisdo % anen / (5 + ra * ipec) + 1
Things to double-check in your solution:
Given the following variables:
boolean thith = true; double litchlind = 2.0; int ensid = 3; double ced = 2.0; int rul = 5;
...draw the AST and evaluation results for the following expression:
!thith == litchlind > 5 && ensid < ced && rul == 6 == 4 < 5 != (!(1 != 8))
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: