 <p>You did not set the flag, in your <code>findLonelyInteger()</code> method's first <code>if</code> condition!</p> <pre><code>if ((i+1) == inputLength) { System.out.println("Lonely Integer: " + inputArray[i]); foundLonelyInteger = true; // --&gt; HERE break; } </code></pre> <p>Command Prompt? Start using Eclipse! And learn debugging!</p>