nextShort static method

String nextShort()

Generates a random 9-digit random ID (code).

Remember: The returned value is not guaranteed to be unique.

Returns a generated random 9-digit code

Implementation

static String nextShort() {
  return (100000000 + Random().nextDouble() * 899999999.0).ceil().toString();
}