title: Count words in a string method?
body: <p>I was wondering how I would write a method to count the number of words in a java string only by using string methods like charAt, length, or substring.</p>
  
  <p>Loops and if statements are okay!</p>
  
  <p>I really appreciate any help I can get! Thanks!</p>