title: uppercase random number of characters from a random alphanumeric string
body: <p>I have some random string with unknown content, what is known is that the content is alphanumeric and in lower case.</p>
  
  <p>I am looking for a simple method to upper case a random number of the alpha characters in that string. The higher the randomness the better.</p>
  
  <p>I can think of a few ways to do this, but none of them seem very optimal.</p>
  
  <p>alright first solution:</p>
  
  <pre><code>public String randomizeCase(String myString){
    Random rand = new Random();
    StringBuilder build = new StringBuilder();
    for(char c: myString.toCharArray()){
       String s = new String(c);
       if(Character.isLetter(c) &amp;&amp; rand.nextBoolean()){
          s = s.toUpperCase();
       } 
       build.append(s);
    }
    return build.toString();
  }
  </code></pre>
  
  <p>I dont like this solution because:</p>
  
  <ul>
  <li>50% chance that every char is uppercased does not equal 50% chance that 50% of the chars are uppercased</li>
  <li>There is a chance that nothing is upped cased</li>
  <li>char to string conversion is ugly</li>
  </ul>