File-By-File
RandomString

RandomString

This utility class provides methods for generating random strings, consisting of alphanumeric characters.

Fields

LETTERS

A char array containing uppercase letters (A-Z).

NUMBERS

A char array containing digits (1-9).

Methods

randomLetter()

Returns a random uppercase letter from the LETTERS array.

randomNumber()

Returns a random digit from the NUMBERS array.

randomChar()

Returns a random character, which can be either a letter or a number, chosen randomly.

randomString(int length)

Generates a random string of the specified length. The string will consist exclusively of alphanumeric characters (letters and numbers).

  • length: The desired length of the random string.

Returns the generated random string.