title: Get character that is right after a specific word in a string?
body: <p>I have a string of text and a specific word that I need to find in the string.  Once I find the next occurence of the word in the string, I need to somehow find the character that directly follows that word.  I tried to use scanner, but it doesn't contain a nextChar() method, and something of that sort would serve the purpose of what I'm trying to do.  What else could I try?  Here's the code I have, but it doesn't do what I want it to do.</p>
  
  <pre><code>public void storeChar(String str)  //used to get the char after the seed and store it in the arraylist of chars
  {
      Scanner sc = new Scanner(str);
      seed = wrdSd.getSeed();
      while(sc.hasNext())  //while there are words left to read
      {
          String next = sc.next();
  
          if(next.equals(seed))  //if the next word of the scanner = the seed
          {
              ch = sc.next().charAt(0);  //gets char at index 0 of the next word
              singleChar.add(ch); //adds the char to the char arraylist
          }   
      }
      sc.close();
  
  }
  </code></pre>
  
  <p>Thanks in advance!</p>