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 ede = 7; int iel = 3; int chec = 7; int pistud = 9; double kotrech = 4.0; double deuziol = 5.0;
...draw the AST and evaluation results for the following expression:
6 - (ede * iel - chec / 5 * 4 + pistud * kotrech) - deuziol
Things to double-check in your solution:
Given the following variables:
boolean ibio = false; int salvi = 5; int gallthrem = 3; int grembo = 1; double pidcosm = 2.0; int giot = 9; boolean badoush = true; int ac = 6; double pido = 4.0; int ma = 4;
...draw the AST and evaluation results for the following expression:
2 != 7 && ibio && (salvi < gallthrem == grembo < 7 == (pidcosm != giot)) != badoush && ac > 9 != pido <= ma
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: