how to generate a random String? in java
- by chandra wibowo
hi everyone,
i have an object called Student, and it has studentName, studentId, studentAddress, etc.
for the studentId, i have to generate random string consist of seven numeric charaters,
eg. studentId = getRandomId();
studentId = "1234567" <-- from the random generator.
and i have to make sure that there is no duplicate id.
thanks in advance