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 prass = 3; int jia = 5; double spakun = 2.0; double fes = 5.0; int la = 2; int u = 3;
...draw the AST and evaluation results for the following expression:
prass - jia + 0 / 2 + spakun * fes + la / u
Things to double-check in your solution:
Given the following variables:
boolean rar = false; boolean ilir = false; boolean ciomcet = false; int greupal = 3; int menges = 9; double a = 5.0; int theas = 4; boolean sertit = false;
...draw the AST and evaluation results for the following expression:
rar && ilir == ciomcet && greupal == menges && 6 > a && theas <= 1 && sertit
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: