Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.security.SecureRandom;
- import java.util.Random;
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- /**
- *
- * @author Alan, Pai
- */
- public class baralho {
- baralho() {
- //
- }
- public void adiciona() {
- int[] volume = new int[13];
- // int[]
- SecureRandom srandom = new SecureRandom();
- Random random = new Random();
- int n = 0;
- for (int i = 0; i < 13; i++) {
- n = n + 1;
- System.out.println("Rsultado: " + random.nextInt(n));
- volume[i] = n;//random.nextInt(51);
- if (n == 13) {
- n = 0;
- }
- //System.out.println("Rsultado: " + random.nextInt(n));
- }
- //for (int i = 0; i < 13; i++) {
- //System.out.println(random.nextInt(13));
- // System.out.println(volume[i]);
- //}
- }
- public void geraRandom() {
- SecureRandom srandom = new SecureRandom();
- int[] aleatorio = new int[13];
- int aux = 0;
- //for (int i = 0; i < 14; i++) {
- aleatorio.setSeed(20);
- System.out.println("Resultado: " + aleatorio.nextInt());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement