I know that there are many questions like this one but it didn't really help me out any. I have to Write a program that will help an elementary school student learn multiplication. Use a SecureRandom object to produce two positive one-digit integers. The program should then prompt the user with a question, such as "How much is 6 times 7?" I have done the hard part but I can not get my variables that is in my class to work for the other methods. i will "get non-static variable randomNumbers cannot be referenced from a static context" error! can someone help me please!!
import java.util.Random;
import java.util.Scanner;
public class computerAssistedInstruction {
Random randomNumbers = new Random();
int answer;// the right answer
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
int input;// the user answer
newQuestion();
input = scnr.nextInt();
if (input != answer) {
System.out.println("No. Please try again.");
}// end of if
else {
System.out.print("Very Good!");
newQuestion();
}// end of else
}// end of main
public static void newQuestion() {
int number1 = randomNumbers.nextInt(10);
int number2 = randomNumbers.nextInt(10);
answer = number1 * number2;
System.out.printf("How much is %d times %d?", number1, number2);
}// end of newQuestion
}// end of class