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 smi = 8; double striddaun = 4.0; int ritden = 6; int lingren = 2;
...draw the AST and evaluation results for the following expression:
smi + 2 - 6 * (6 + 7 * striddaun * ritden) % lingren
Things to double-check in your solution:
Given the following variables:
boolean bimhe = false; boolean ossglad = true; double ucish = 2.0; int ce = 9; boolean suario = false; int o = 2; double tre = 4.0; int phin = 9; int nec = 7;
...draw the AST and evaluation results for the following expression:
bimhe != ossglad != (ucish == ce) != suario != (2 == o) || 3 <= tre || phin == nec
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: