title: changing String value based upon String[] index
body: <p>i know how to do this</p>
  
  <pre><code>public class AccountPicker {
  
      public static void main(String[] args) throws InterruptedException {
          String password = "";
          String[] accounts = {"a", "b", "c"};
  
          Random r = new Random();
          int assigned = r.nextInt(3);
  
          if (assigned == 2) {
              password = "password";
              System.out.println("account: " + accounts[assigned] + " " + "password: " + password);
          }
  
          if (assigned == 1) {
              password = "Password";
              System.out.println("account: " + accounts[assigned] + " " + "password: " + password);
          }
  
          if (assigned == 0) {
              password = "PASSWORD";
              System.out.println("account: " + accounts[assigned] + " " + "password: " + password);
          }
      }
  }
  </code></pre>
  
  <p>basically what this is doing is choosing a account <code>a, b , or c</code> and changing <code>password</code>  based upon which index was picked out of <code>accounts</code></p>
  
  <p>but what if i have 100 values in <code>accounts</code>?</p>
  
  <p>making 100 if statements would take up too much code..</p>
  
  <p>is there a more efficient way of doing this?</p>