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 raqa = 9; int gesmfra = 7; int la = 7; double haun = 4.0; int pu = 8;
...draw the AST and evaluation results for the following expression:
raqa * gesmfra * 4 - (la + haun / pu - 4)
Things to double-check in your solution:
Given the following variables:
boolean doua = true; int i = 4; boolean mawldeal = true; int ce = 3; double piafia = 5.0; boolean in = false;
...draw the AST and evaluation results for the following expression:
doua || 8 < i && mawldeal && 2 <= 5 != ce <= piafia && in
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: