title: How can I get the next char in my string with the stringreader in Java?
body: <p>Consider this code:</p>
  
  <pre><code>public static void main (String[] args) {
  
      String name = "(My name is Bob)(I like computers)"
  
      StringReader s = new StringReader(name);
  
      try {
          // This is the for loop that I don't know 
          for () {
              String result = "";  
              // Here the char has to be appended to the String result.
          }
          System.out.println("The string is: " + result);
  
      } catch (Exception e) {
          e.toString();
      }
  }
  </code></pre>
  
  <p>What I am looking for is a for-loop that first looks at the character at the current position and then appends it to a string if that character is not ")". However, the char ")" should also be appended to the string. In this example the output should be:</p>
  
  <p>The string result is: (My name is Bob)</p>