title: Scanner not working properly in recursion call
body: <p>So this is my code:</p>
  
  <pre><code>import java.util.Scanner;
  
  
  public class partOne {
  private static Scanner s;
  public static void main(String [] args) {
      s = new Scanner(System.in);
      System.out.print("type: ");
  
  
      System.out.println(recursionPartOne(s.next()));
  
  
  }
  public static String recursionPartOne(String str) {
      System.out.print(str + " ");
      if (s.next() == null) {
          return str;
      } else
  
          return recursionPartOne(s.next());
  
  }
  }
  </code></pre>
  
  <p>And this is what it outputs if I give it the following:</p>
  
  <pre><code>type: this is a test run
  this a run 
  </code></pre>
  
  <p>My main goal is to have it output the independent string elements in reverse order using recursion, but right now I can't understand why the s.next() call is skipping every other element and why the <code>System.out.println(recursionPartOne(s.next()));</code> is not being called</p>
  
  <p>Thanks for any responses</p>