I\'ve been looking for a simple Java algorithm to generate a pseudo-random alpha-numeric string. In my situation it would be used as a unique session/key identifie
Using an Apache Commons library, it can be done in one line:
import org.apache.commons.lang.RandomStringUtils; RandomStringUtils.randomAlphanumeric(64);
Documentation