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 inti = 7; double diswad = 1.0;
...draw the AST and evaluation results for the following expression:
5 - 0 - inti - 3 + 7 / 8 / diswad % 1
Things to double-check in your solution:
Given the following variables:
double tobolt = 5.0; double wecmun = 2.0; boolean conont = false; boolean iss = false; double krep = 5.0; double sucdost = 3.0; double roboc = 3.0;
...draw the AST and evaluation results for the following expression:
4 > 7 != tobolt > wecmun && !conont != iss && 0 >= 1 || krep != 8 && sucdost <= roboc
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: