How do I make Java register a string input with spaces?

Here is my code:

public static void main(String[] args) {
  Scanner in = new Scanner(;
  String question;
  question =;

  if (question.equalsIgnoreCase("howdoyoulikeschool?") )
    /* it seems strings do not allow for spaces */

When I try to write "how do you like school?" the answer is always "Que?" but it works fine as "howdoyoulikeschool?"

Should I define the input as something other than String?

Answers: will return space-delimited strings. Use in.nextLine() if you want to read the whole line. After reading the string, use question = question.replaceAll("\\s","") to remove spaces.