title: Java Encryption with Loops and Key?
body: <p>Trying to do a simple encryption using Strings, loops and chars. Need to know how to replace the capitalized letters in the String by looping through the sentence and replace characters with a key.</p>
  
  <pre><code>String capitalize = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  String lower = "abcdefghijklmnopqrstuvwxyz";
  String num = "1234567890";
  String user = "Hello World 123 (456).";
  
  String encrypt = "";
  for (int x = 0; x &lt; user.length(); x++)
  {
      char c = user(x);
      if (Character.isUpperCase(c))
      {
          Replace the upper case letters here.
      }
  </code></pre>
  
  <p>//more code beneath the if but just need help on the first part to get things going</p>