public class Play { private int[] numeros; private String numerosString=""; public int[] getNumeros() { return numeros; } public String getNumerosString() { return numerosString; } public int[] lanzarDados(){ this.numeros= new int[5]; for (int i=0; i<5;i++){ this.numeros[i] = (int) Math.floor(Math.random()*6+1); this.numerosString += this.numeros[i]; } return this.numeros; } }