-1
Я создал новый класс с именем «Вопрос» (Question.java) Вызвав его в основном действии для создания массива, он говорит «Не удается разрешить символ». Код выглядит следующим образом. В деятельностиНе удается разрешить символ
private Question [] mQuestionBank = new Question[] {
new Question (R.string.question_punjab,true),
new Question (R.string.question_cat, true),
new Question (R.string.question_wear, false),
new Question (R.string.question_iPhone, true),
new Question (R.string.question_shahrukh,false)
};
Класс вопрос заключается в следующем
public class Question {
private int mTextResId;
private boolean mAnswerTrue;
public int getTextResId() {
return mTextResId;
}
public void setTextResId(int textResId) {
mTextResId = textResId;
}
public boolean isAnswerTrue() {
return mAnswerTrue;
}
public void setAnswerTrue(boolean answerTrue) {
mAnswerTrue = answerTrue;
}
public Question(int textResiD, boolean AnswerTrue) {
mTextResId = textResId;
mAnswerTrue = answerTrue;
}
}
ваш конструктор имеет опечатку "textResiD "против" textResId " – Gerd
И answerTrue vs AnswerTrue – DadoZolic