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 prorhod = 2.0; int garism = 2; int gialun = 1;
...draw the AST and evaluation results for the following expression:
0 + 3 % 5 - prorhod % 5 * garism % gialun
Things to double-check in your solution:
Given the following variables:
boolean tresups = true; double zass = 3.0; int ve = 4; double a = 1.0; boolean pherm = false;
...draw the AST and evaluation results for the following expression:
!tresups != 7 >= zass || 9 != ve == ((a != 3) || pherm) != (!(5 != 3))
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: