For each of the Java expressions below:
Be sure that your tree accurately reflects how Java would evaluate the expression.
Given the following variables:
double skucta = 3.0; double ne = 2.0; int lihit = 1; double kodpo = 5.0;
...draw the AST and evaluation results for the following expression:
(3 + skucta * ne / lihit - kodpo) * 7 / 8
Things to double-check in your solution:
Given the following variables:
double worfa = 3.0; double wucie = 5.0; boolean ma = false; int as = 5; int podte = 3; double fi = 1.0;
...draw the AST and evaluation results for the following expression:
worfa >= wucie && 9 <= 8 == ma && 9 >= as && podte > 7 && 5 >= fi
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: