Ir para conteúdo
  • 0

[Stack] Bloquear item de stacar


Gutyerrez

Pergunta

2 respostass a esta questão

Posts Recomendados

Acho que foi o Alex que me passou esse código... Eu usei no F_Maquinas, agora tô fazendo de outro jeito!

	private static final Random RANDOM;
	private static final char[] APPEND;

	public static String randomString() {
		APPEND[1] = (char) (48 + RANDOM.nextInt(10));
		APPEND[3] = (char) (48 + RANDOM.nextInt(10));
		APPEND[5] = (char) (48 + RANDOM.nextInt(10));
		APPEND[7] = (char) (48 + RANDOM.nextInt(10));
		return new String(APPEND);
	}

	static {
		RANDOM = new Random();
		APPEND = new char[] { '§', '\0', '§', '\0', '§', '\0', '§', '\0' };
	}

//Pra usar você coloca no nome do item 'randomString()'
Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...