title: method not updating original string variable
body: <p>I'm having problem with this code that i wrote to convert the string....the string is not being updated throughout the code...</p>
  
  <pre><code>import java.io.BufferedReader;
  import java.io.InputStreamReader;
  
  public class PigLatin {
  private static String str = "pig";
  private char[] vowels = { 'a', 'e', 'i', 'o', 'u' };
  private Character firstChar, secondChar;
  
  public void inputString(String str) {
      try {
          InputStreamReader isr = new InputStreamReader(System.in);
          BufferedReader input = new BufferedReader(isr);
          str = input.readLine();
      } catch (Exception e) {
          // TODO: handle exception
          System.out.println("unable to input String");
          e.printStackTrace();
      }
      firstChar = str.charAt(0);
      secondChar = str.charAt(1);
      System.out.println(firstChar);
      System.out.println(secondChar);
  }
  
  public static void main(String[] args) {
      PigLatin pl = new PigLatin();
      System.out.println("Enter an english word to convert to PigLatin");
      pl.inputString(str);
      System.out.println(str);
      pl.convert(str);
  }
  
  public void convert(String lowerCase) {
      // TODO Auto-generated method stub
      System.out.println("Original string:" + str);
      if (isVowel())
          str.concat("yay");
      else {
          String suffix = firstChar.toString() + "ay";
          // String suffix = String.valueOf(str.charAt(0))+"ay";
          str = str.substring(1) + suffix;
      }
      System.out.println("PigLatin:" + str);
  
  }
  
  public boolean isVowel() {
      // TODO Auto-generated method stub
      for (char ch : vowels) {
          if (firstChar.equals(ch)) {
              if (firstChar.equals('v') &amp;&amp; secondChar.equals('q'))
                  return false;
              return true;
          }
          if (firstChar.equals('y') &amp;&amp; !secondChar.equals(ch))
              return true;
      }
      return false;
  }
      }
  </code></pre>
  
  <p>The output is as follows:
  Enter an english word to convert to PigLatin</p>
  
  <p>kite</p>
  
  <p>k    "first character"</p>
  
  <p>i    "second character"</p>
  
  <p>pig</p>
  
  <p>Original string:pig</p>
  
  <p>PigLatin:igkay</p>
  
  <p>Why is the string not being updated even if I'm giving the input in the command line evn though the first and second characters are correctly read from the string that I input..Please help....</p>