title: Using recursion to reverse a phrase
body: <p>I have an assignment that asks me to create a Java program that reverses an input phrase using recursion and outputs it. For example, given an input "DATA STRUCTURES AND ALGORITHMS" the program would output "ALGORITHMS AND STRUCTURES DATA".</p>
  
  <p>One of the restrictions is that no storage or Java collections may be used in the program except for a single local String variable.</p>
  
  <p>I am having trouble understanding how I would read the input data from multiple lines and implement the recursive method on the string. I understand the general concept of recursion, however implementing it into Java is a more difficult task.</p>