1 import java.util.ArrayList;
2 import java.util.Scanner;
3
4 /**
5 This program shows a simple quiz with one question.
6 */
7 public class QuestionDemo1
8 {
9 public static void main(String[] args)
10 {
11 Scanner in = new Scanner(System.in);
12
13 Question q = new Question();
14 q.setText("Who was the inventor of Java?");
15 q.setAnswer("James Gosling");
16
17 q.display();
18 System.out.print("Your answer: ");
19 String response = in.nextLine();
20 System.out.println(q.checkAnswer(response));
21 }
22 }
23