title: How can I generate a random 7-character alphanumeric string?
body: <p>I did the stuff like this but not working. the base48Encode method parameter I have passed the current system time in milli secs</p>
  
  <pre><code>private static final String CHARACTER_SET = "23456789abcdefghijkmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ";
  
  public static String base48Encode(double d) {
      Double num = Double.valueOf(d);
      Integer length = CHARACTER_SET.length();
      String encodeString = new String();
      while (num &gt; length) {
          encodeString = CHARACTER_SET.charAt(num.intValue() % length) + encodeString;
          num = Math.ceil(new Double(num / length) - 1);
      }
      encodeString = CHARACTER_SET.charAt(num.intValue()) + encodeString;
  
      return encodeString;
  }
  </code></pre>