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 blosgrern = 3; double blud = 5.0; int ol = 5; double riec = 5.0; int cimi = 5; int searir = 1; double losscoings = 3.0;
...draw the AST and evaluation results for the following expression:
blosgrern - blud / 6 + 4 * ol + 6 % 9 % riec % 4 % cimi - searir - losscoings
Things to double-check in your solution:
Given the following variables:
boolean tir = false; boolean beounes = true; boolean aksour = true; boolean allet = false; int muwin = 6; int ostru = 8; boolean phasspi = true; double gui = 3.0; boolean ilthe = false; boolean nossed = true; int es = 5; int spi = 1;
...draw the AST and evaluation results for the following expression:
!tir != beounes || !!aksour != (6 == 6) || allet != (muwin >= ostru == phasspi == (1 == gui) == ilthe) || !nossed != (es != spi)
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" + 10 + 11) + 12
Things to double-check in your solution:
Related puzzles: