i have a 2 data classes
first:
public class Question {
public CharSequence question;
public Answer answers[];
}
second:
public class Answer {
public CharSequence text;
public int number;
}
now i want to save an Answer to Question:
Question qstn.answers = new Answer[2];
[...]
But i got an NullPointerException. Whats wrong? Can't I change the length of an Array in an other class?