There must be a class name within the <> to declare what type the list contains
Where is qAns declared? It must be in scope (declared within the {}s) where it referenced.
See my post#2
Type: Posts; User: Norm
There must be a class name within the <> to declare what type the list contains
Where is qAns declared? It must be in scope (declared within the {}s) where it referenced.
See my post#2
What line is line 15?
Where is qAns declared? I do see the symbol qAns used in the posted code. What code did that come from?
I see a similar named variable: QAns
I therefore assume you...
Please copy the full text of the error message and paste it here.
Can you post the code that did not throw errors? The variable: QAns must have been declared in scope for the code to compile...
A problem with the posted code is that the import statements are inside of the class declaration. They need to be moved outside.
import java.util.ArrayList;
import java.util.Scanner;
public...
Please copy the current code and paste it here.
The posted code will not compile because the import statements are inside of the class. They should be before the class.
Changing an ArrayList to...
Where is the variable QAns defined that is in scope where it is referenced?
The only declaration for QAns I see is as a local parameter to the Trivia class.
It looks like that variable needs to...