Practice Parsing Problems
For each of the following, if the Java statement is legal, parse it
using the rules from the text. Otherwise, explain why the statement is
not legal.
The rules for Java are available online.
-
exp = life / 7 + 12;
Be sure to show every step and give the number of each rule that
you are using.
-
b1 = new Button("Hello");
Be sure to show every step and give the number of each rule that
you are using.
-
age = "jeff" - 72;
Be sure to show every step and give the number of each rule that
you are using.