title: Issue with output for Pig latin program
body: <p>So im new to coding and i am having some issues... My program is supposed to ask the user for input, and will need to assume that all the input is lowercase... and need to assume there are no extra spaces, and will need to assume it ends with a period. The program will then translate the text into pig latin... Just incase you need the rules for pig latin they are if the word beging with a vowel, add a dash and "way" to the end... Otherwise, add a dash move the first letter to the end, and add "ay"... Now i know my code can be better but i just want to get it running first and then change it if i need too. The issue i am having is that, my code prints all my text but it doesnt not change the individual word to pig latin. And the other text has to also be in pig latin, i have pasted the code below. So any help would be awesome... Thanks.</p>
  
  <pre><code>import java.util.Scanner;
  public class PigLat{
     public static void main(String [] args) {
  
     Scanner scanner = new Scanner(System.in);
     String text, pigLatin;
     char first;
  
     System.out.print("Enter a line of text: ");
     text= scanner.nextLine();
     first = text.charAt(0);
  
     if (first == 'a' || first == 'e' || first =='i'||
         first == 'o' || first == 'u')
         pigLatin = text + "-way";
  
     else
         pigLatin = text.substring(1) + "-" + text.charAt(0) + "ay";
  
     System.out.println("Input : " + text);
     System.out.print("Output: " + pigLatin);
  }
  }
  </code></pre>
  
  <p>My Output:</p>
  
  <p>Enter a line of text: this is a test</p>
  
  <p>Input : this is a test</p>
  
  <p>Output: his is a test-tay
       ----jGRASP: operation complete.</p>