Skip to content
Snippets Groups Projects
Commit 80a8ed9b authored by Noah Heuser's avatar Noah Heuser
Browse files

Pseudo-random word generator

parent 2943d975
No related branches found
No related tags found
No related merge requests found
package auxiliary;
import java.util.Random;
public class WordGenerator {
Random random = new Random();
public String wordGenerator(int maxLength, int alphaSize) {
return random.ints(random.nextInt(maxLength + 1), 97, 97 + alphaSize)
.collect(StringBuilder::new, StringBuilder::appendCodePoint, StringBuilder::append).toString();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment