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 mentda = 8; double a = 3.0; int nass = 6; int zattra = 8; double grosqash = 3.0;
...draw the AST and evaluation results for the following expression:
4 * 6 + mentda * 8 * a * 2 / 2 + (nass % zattra) * grosqash + 5
Things to double-check in your solution:
Given the following variables:
boolean sophbec = false; boolean eoldor = false; boolean si = false; int pricsaic = 6; boolean roa = false; boolean heass = false; double dioprep = 3.0; double siorchong = 1.0;
...draw the AST and evaluation results for the following expression:
sophbec == eoldor || !si && 7 != pricsaic || !(!(8 > 5)) || 3 == 3 && roa != (!(8 != 4)) != heass != dioprep <= siorchong
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" + 10 + 11
Things to double-check in your solution:
Related puzzles: