code: private static String generateKey(int num) {
          Random random = new Random();
          String key = "";
  
          for (int x = 0; x < num; x++) {
              key += CHARACTERS[random.nextInt(CHARACTERS.length)];
          }
          return key;
      }
docs: Given a <code>int</code> num, generates and returns a random
  <code>String</code> key the length of num.
  
  @param num
  @return String - key