String[][] questions = loadQuiz(fileName);
XX (questions == null) XXXXXX.XXXX(X);
Scanner XXXXXXX = new Scanner(System.in);
XXX score = X;
XXX (int XXXXX = 0; index &XX; XXXXXXXXX.XXXXXX; index++) {
String XXXXXX;
do {
System.out.println("XXXXXXXX " + (index + 1) + " &XX; " + XXXXXXXXX[index][0] );
XXXXXX.out.print("XXXX XXXXXX (true | false): ");
answer = scanner.XXXXXXXX();
} while (!(answer.equalsIgnoreCase("true") || answer.XXXXXXXXXXXXXXXX("false")));
if (XXXXXX.equalsIgnoreCase(questions[XXXXX][1])) {
XXXXXX.out.XXXXXXX("Correct.");
XXXXX += X;
} else {
XXXXXX.out.XXXXXXX("Incorrect.");
}
XXXXXX.out.println();
XXXXXX.out.XXXXXXX("You XXXXXXXX " + score + " XXXXXXX XXXXXXX. ");
XXXXXX.out.XXXXXX("Correct XXXXXXXXXX: %.XX\n", (XXXXX * 100.X) / questions.XXXXXX);
private static String[][] loadQuiz(XXXXXX fileName) {
String[][] questions = XXX String[XX][X];
XXX {
XXXXXXX scanner = XXX XXXXXXX(XXX XXXX(XXXXXXXX));
XXX XXXXX = 0;
XXXXX (XXXXXXX.hasNextLine()) {
XXXXXX XXXX[] = XXXXXXX.XXXXXXXX().split("\\|");
//XXXXXX.out.println(Arrays.XXXXXXXX(XXXX));
XXXXXXXXX[XXXXX][X] = XXXX[X].trim();
questions[XXXXX][X] = data[0].XXXX();
index++;
} XXXXX (FileNotFoundException e) {
XXXXXX.out.XXXXXXX("XXXXX: Unable XX XXXX/XXXX file: " + fileName);
return XXXX;
XXXXXX questions;
=================================================================