title: Trying to return true if all the letters in a string are the same
body: <p>What I have so far:</p>
  
  <pre><code> public boolean allSameLetter(String str)
  {
    for (int i = 1; i &lt; str.length(); i++)
      {
          int charb4 = i--;
          if ( str.charAt(i) != str.charAt(charb4))
          {
          return false;
          }
  
          if ( i == str.length())
          {
          return true;
          }
      } 
  }
  </code></pre>
  
  <p>Please excuse any inefficiencies if any; still relatively new to coding in general. Am I lacking some knowledge in terms of using operators and .charAt() together? Is it illogical? Or is my error elsewhere?</p>