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 go = 3; int cu = 1; double ris = 3.0; double bidphi = 3.0; int woing = 5; double wiscer = 1.0;
...draw the AST and evaluation results for the following expression:
go + cu - (1 + 0 - ris) * bidphi / woing + 8 % wiscer
Things to double-check in your solution:
Given the following variables:
boolean usic = true; int cii = 9; double bimat = 5.0; boolean paet = false; boolean ansped = false; boolean serad = true; int sengper = 2; double hapang = 5.0; boolean heapos = true; boolean enstid = false;
...draw the AST and evaluation results for the following expression:
!!usic != !(cii < bimat) || paet != ansped != serad && sengper > hapang || (heapos != enstid)
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
Things to double-check in your solution:
Related puzzles: