All Downloads are FREE. Search and download functionalities are using the official Maven repository.

br.com.caelum.stella.DigitoGenerator Maven / Gradle / Ivy

There is a newer version: 2.1.7
Show newest version
package br.com.caelum.stella;

import java.util.Random;

public class DigitoGenerator {
	private static final Random RANDOM = new Random();

	public String generate(int quantidade) {
		final StringBuilder digitos = new StringBuilder();
		for (int i = 0; i < quantidade; i++) {
			digitos.append(RANDOM.nextInt(10));
		}
		return digitos.toString();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy