Lo que pasa es que necesitas sobrescribir el metodo toString() o llamar al metodo tiraDado()
System.out.println(dados.get(i).tiraDado());
System.out.println(dados.get(i).tiraDado());
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
#! /bin/bash
java -jar ~/.jdownloader/JDownloader.jar
#! /bin/bash
java -cp [ruta a tu carpeta de binarios] [paquete de la clase donde se encuentra el main]
]import java.util.Scanner;
public class Prueba {
public static void main(String[] args) {
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'};
System.out.println("Introduce el numero de caracteres a cifrar en ROOT13");
Scanner scann = new Scanner (System.in);
int maximo = scann.nextInt();
char letra[];
letra = new char[maximo];
for (int k=0; k<maximo; k++) {
letra[k] = scann.next().charAt(0);
}
for (int i=0; i<maximo; i++) {
for (int j=0; j<27; j++) {
if (letra[i] == abecedario[j]) {
int x = j + 13;
if (x>=27) {
x = x - 27;
letra[i]=abecedario[x]; }
else {
letra[i]=abecedario[x];
}
break;
}
}
}
for (int g=0; g<maximo; g++){
System.out.println(letra[g]);
}
}
}
class Empezo{
public static void main(String[]args){
int numero1 =-1;
String mensaje;
mensaje = (numero1==0)? "El numero Introduccido es 0":(numero1<0) ? "El número Introduccido es Negativo":"El número Introduccido es positivo";
System.out.println(mensaje);
}
}
/*
Copyright (c) <2012> <xmbeat::Juan Hebert Chable Covarrubias>
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions of
the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
public class Base64 {
private static String TABLE_64;
private static byte INDEX_TABLE[] = new byte[256];
private char _padChar = '=';
static
{
TABLE_64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
for (int i = 0; i < 64; i++)
{
INDEX_TABLE[TABLE_64.charAt(i)] = (byte)i;
}
}
public Base64(){}
public Base64(char padChar)
{
_padChar = padChar;
}
public String encode(byte[] data)
{
int finalLen = data.length / 3 * 4;
if (data.length % 3 > 0)finalLen+=4;
StringBuffer string64 = new StringBuffer();
string64.setLength(finalLen);
int leftBits = 0;
int rightBits = 0;
int shift = 2;
int index = 0;
for (int i = 0; i < data.length; i++)
{
int curByte = data[i] & 0xFF;
leftBits = (rightBits | (curByte >> shift));
string64.setCharAt(index++, TABLE_64.charAt(leftBits));
rightBits = (curByte << (6-shift)) & 0x3F;
if (shift == 6 || i == data.length - 1)
{
string64.setCharAt(index++,TABLE_64.charAt(rightBits));
rightBits = 0;
shift = 2;
}
else
shift+=2;
}
for (;index < finalLen; index++)
{
string64.setCharAt(index, _padChar);
}
return string64.toString();
}
public byte[] decode(String data)
{
int realLen = data.length() - 1;
while(data.charAt(realLen)==_padChar) realLen--;
realLen++;
byte []result = new byte[realLen*3/4];
int rightBits = 0;
int leftBits = 0;
int shift = 2;
int index = 0;
boolean procesado = false;
for (int i = 0; i < realLen; i++)
{
int curByte = INDEX_TABLE[data.charAt(i)] & 0xFF;
//Incluí todos los caractares a una tabla, para asi ganar un poco de velocidad
//Pero a consecuencia de que si un byte no esta en la tabla lo trata como la letra
//'A', si quieren pongan un condicional para generar una excepcion
rightBits = curByte >> (8-shift);
if (procesado)
{
result[index++]=(byte)(rightBits | leftBits);
}
leftBits = (curByte << shift) & 0xFF;
if (shift == 8)
{
procesado = false;
shift = 2;
}
else
{
procesado = true;
shift += 2;
}
}
return result;
}
public static void main(String[] args)
{
Base64 converter = new Base64();
String strEncode = converter.encode("A la ***** la universidad, yo quiero ser actor porno".getBytes());
System.out.println(strEncode);
System.out.println(new String(converter.decode(strEncode)));
}
}
public void sendData(OutputStream salida) throws IOException
{
if (isReady())
{
byte buffer[] = new byte[SIZE_BUFFER];
int sizeChunk = 0;
if (_source instanceof File)
{
File file = (File)_source;
FileInputStream entrada = new FileInputStream(file);
while((sizeChunk = entrada.read(buffer))>0)
{
salida.write(buffer, 0, sizeChunk); //he intentado con flush(), pero no!
}
}
else if (_source instanceof byte[])
{
byte src[] = (byte[])_source;
int max = src.length / SIZE_BUFFER;
int rest = src.length % SIZE_BUFFER;
int i = 0;
while (i < max)
{
salida.write(src, i*SIZE_BUFFER, SIZE_BUFFER);
i++;
}
if (rest > 0)
{
salida.write(src, i*SIZE_BUFFER, rest);
}
}
salida.flush();//Aseguramos que se envien, segun...
}
}