title: Convert java char inside string to lowerCase/upperCase
body: <p>I have a String called "originalstring" which contains a sentence with mixed upper and lower case characters. </p>
  
  <p>I simply want to flip the string so that if a character is a lowercase make it upper case and vice versa and return it. </p>
  
  <p>I have tried this code, which returns the original string in upperCase:</p>
  
  <pre><code>for (int i = 0; i &lt; originalString.length(); i++) {
          char c = originalString.charAt(i);
  
          if (Character.isUpperCase(c)) {
              originalString += Character.toLowerCase(c);
  
          }
  
          if (Character.isLowerCase(c)) {
              originalString += Character.toUpperCase(c);
  
          }
  
      }
      return originalString;
  </code></pre>