At the four places where you construct the question you can also calculate the correct answer, and save it in a variable so you can check the user's answer against that value when they press "submit".
JamesCherrill
Posting Genius
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
You need to parse the text from the textfield to get its integer value, Have a look at the Integer.parseInt method.
JamesCherrill
Posting Genius
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073