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 prioscan = 2; int is = 4; int hetro = 8; int reir = 2; double hur = 4.0; double issil = 1.0;
...draw the AST and evaluation results for the following expression:
prioscan * is * hetro * reir % hur / 4 + issil - 2
Things to double-check in your solution:
Given the following variables:
int nestcom = 7; int oussgi = 5; boolean qi = false; boolean ed = false; double pe = 4.0; int cer = 7; double grantfin = 5.0; int lasschas = 9; int xer = 2;
...draw the AST and evaluation results for the following expression:
nestcom == oussgi || qi != ed || 7 > 7 == 0 > pe && cer == grantfin || lasschas >= xer
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
Things to double-check in your solution:
Related puzzles: