title: Find non-repeated character in a string
body: <p>I have to create a program for returning the next non-repeated character..</p>
  
  <p>ex I give ... <code>tweet</code><br>
  and it should return output as <code>w</code>...</p>
  
  <pre><code>public class str_next {
  
      public static void main(String args[]) throws Exception {
          BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
          System.out.println("Enter the string");
          String s = br.readLine();
          revString(s);
      }
  
      static char revString(String str) {
          int i = 0;
          int j;
          int n = str.length();
          for (i = 0; i &lt; n; i++) {
              for (j = i + 1; j &lt; n; j++) {
                  char c = str.charAt(i);
                  char d = str.charAt(j);
                  if (c != d) {
                      System.out.print(d);
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>I am getting error as .. missing return statement..</p>
  
  <p>Can anyone please tell me.. How do I solve such a problem.. Where am I wrong..?</p>