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 tinttrant = 1; double ungras = 2.0; int cu = 9; double epru = 2.0; int hickpod = 9; int eress = 3;
...draw the AST and evaluation results for the following expression:
5 % (tinttrant % ungras / cu) % epru * 5 - 5 - hickpod + eress
Things to double-check in your solution:
Given the following variables:
boolean a = true; boolean thas = false; boolean iio = true; boolean facca = false; int iphrerd = 4;
...draw the AST and evaluation results for the following expression:
a == thas == iio || (facca && 3 < 3 == (iphrerd != 9)) || !(3 >= 1) && !(2 > 2)
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: