title: How to convert a string to uppercase without using the toUpperCase method?
body: <p>I'm a beginner at java and can't get this code to work. What I have to do is convert any inputted string to uppercase without using the toUpperCase string method. This is what I have:</p>
  
  <pre><code>public String toUpperCase(String str)
  {
      for(int i = 0; i &lt; str.length(); i++)
      {
          char a = str.charAt(i);
          a = Character.toUpperCase(a);
          str += Character.toString(a);
      }
  return str;
  }
  </code></pre>