public class Reviewmaker {
public static void main (String args[]) {
System.out.println("Review Maker");
System.out.println("----------------------------------------------------");
System.out.println("By: Sami Besellam");
String Question, Answer;
System.out.println("How many questions do you Want?");
int f = Expo.enterInt();
int e = 1;
String[] Q = new String [e];
String[] A = new String [e];
for (int k = 1; k <= f; k++) {
System.out.println("Enter question " +k);
Q[k] = Expo.enterString();
System.out.println("Enter Answer " +k);
A[k] = Expo.enterString();
}
for (int k = 1; k <= f; k++) {
System.out.println("Question #" + k);
System.out.print(Q[k]);
System.out.println("Question #" +k);
System.out.print(A[k]);
}
}
}
// Q = E + k
It gives me this error message when I type in my first question "Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1" at Reviewmaker.main(Reviewmaker.java:18)
By the way I am using Jgrasp Expo.io if any one is familiar it would be greatly appreciated