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 samic = 8; int preuit = 1; int mi = 8; double hepwhi = 2.0; int e = 5; int naru = 1;
...draw the AST and evaluation results for the following expression:
samic * 6 + preuit / mi - hepwhi * 6 / e / 7 % 3 + naru
Things to double-check in your solution:
Given the following variables:
int eghtpri = 8; int sodsa = 5; boolean predscrid = true; boolean proxwi = true; double fe = 5.0; boolean et = false; double opkne = 4.0; double enbel = 2.0; boolean uentcess = true; boolean qiem = true;
...draw the AST and evaluation results for the following expression:
eghtpri != 5 && 9 < sodsa == predscrid == (proxwi == fe >= 2 && et == (opkne != enbel) == uentcess) && qiem
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
Things to double-check in your solution:
Related puzzles: