 <p>When you do <code>String y = in.nextLine()</code>, the next token is the leftover newline from the previous <code>nextInt()</code> call, so <code>y</code> ends up being equal to <code>\n</code>.</p> <p>Place a call to <code>nextLine()</code> after you use <code>nextInt()</code>:</p> <pre><code>int x = in.nextInt(); in.nextLine(); </code></pre> <p>Afterwards you should be able to call <code>nextLine</code> only once when getting the user input:</p> <pre><code>String y = in.nextLine(); if(y.equals("Washington")){ </code></pre>