I have problems with multiple conditions in a java while loop. I am trying to put conditions as not equal as null, but android studio says that && cannot be applied to boolean. Any help is appreciated!
I am trying to do this:
String question = null, answer = null, answerOne = null,
answerTwo = null, answerThree = null, answerFour = null;
while (((question = reader.readLine()) != null)
&& ((answer = reader.readLine()) != null)
&& (answerOne = reader.readLine()) !null)
&& ((answerTwo = reader.readLine()) != null)
&& (anwserThree = reader.readLine()) != null)
&& ((anwserFour = reader.readLine()) != null)) {
//reading some lines from resource file
Question q = new Question(question, answer, answerOne, answerTwo,
answerThree, answerFour);
mQuestions.add(q);
}