title: How to randomly select letters in Java?
body: <p>I am learning java, and my assignment now is to simulate a chess notation.</p>
  
  <p>I have done random int codes, but not sure how to make a random letter code, and the thing is I only need to choose random letters from <code>A</code> to <code>H</code>, I have seen random all <strong>26</strong> letter generators but could not work my way to understand how to generate only <code>A</code> to <code>H</code>.</p>
  
  <p>My other concern is will I be able to store char and ints in a matrix <code>[k][8]</code> or do I have to initialise it in a special way? </p>
  
  <p>The idea is to create the class and later try and randomly generate chess notation.  At this stage, the notations do not have to make sense.</p>
  
  <p>Here is what I used for int random</p>
  
  <pre><code>import java.util.Random;
  
  static Random rnd = new Random();
  static int rnd(int A, int B) { 
      return A + rnd.nextInt(B - A + 1);
  </code></pre>
  
  <p>Also, <strong><em>how can I make the random selection from specified letters that will represent the chess figures?</em></strong></p>
  
  <p>I don't need exact codes a push to the right direction will be more than enough.</p>