Auto skipping input
<pre><code>public static void main(String[] args) {    
    Scanner in = new Scanner(System.in);
    System.out.print("Please choose.('e' to encrypt, 'd' to decrypt, 'q' to quit): ");
    String userIn= in.next();
    if(userIn.equals("e")){
        System.out.println("Please enter your text that you want to encrypt: ");
        String userInput = in.nextLine();

        System.out.print("Please enter your shift key(0-25): ");
        int userS = in.nextInt();
        if(userS &lt; 0 || userS &gt; 25){
            System.out.print("Invalid shift key, please enter a valid shift key: ");
            userS = in.nextInt();
        }
</code></pre>

<p>In my above  program at following part of code: </p>

<pre><code>System.out.println("Please enter your text that you want to encrypt: ");
                String userInput = in.nextLine();

                System.out.print("Please enter your shift key(0-25): ");
</code></pre>

<p>It is skipping this <code>userInput</code>, it goes over it and asks for the shift key before I enter the text.</p>
