Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public char[] generarCodigo() {
- char[] abecedario = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
- 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y','Z'};
- char[] codigo = new char[4];
- for (int i = 0; i <4; i++) {
- int escogido = (int) (Math.random() * 25);
- codigo[i] = abecedario[escogido];
- }
- return codigo;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement