I have an ArrayList of Question Class objects and I need to output the random selected question. everithing seems OK but when I run it, gives me a java lang nullpointerException
public class GameBean implements Serializable {
private Random random;
private String question;
private String answer;
//above are the attributes
METHOD
public Question getQuestion() {
int index = random.nextInt(questionList.size());
Question q = questionList.get(index);
return q;}