Java: Rolling dices and output
<p>Im trying to rolling dices and then system print 1 of the dices when im calling slaTarningar() inside class Player,</p>

<pre><code>class Player{
    int armees = 0;
    int diceAmount = 0;
    Dice Dices[];
    Player(String playerType){
        armees = 10;
        diceAmount = ("A".equals(playerType)) ? 3 : 2;
        Dices= new Dice[diceAmount];
        for(int i=0;i&lt;Dices.length;i++){
            Dices[i]=new Dice();
        }
    }
    void slaTarningar(){
        for(int i=0;i&lt;Dices.length;i++){
            Dices[i].role();
        }
        System.out.println ("Dice: "+ Dices[1]);
    }
    void visaTarningar(){
        String allDices="";

        for(int i=0;i&lt;Dices.length;i++){
            allDices += ", " + Dices[i];
        }
    }
}
class Dice{
    int value;
    Dice(){
        value=0;
    }
    void role(){
        int role;
        role = (int)(Math.random()*6+1);
        value=role;
    }   
}
</code></pre>

<p>All i get is my project name, and something weird else:</p>

<pre><code>Dice: javaapplication9.Dice@9304b1 
</code></pre>

<p>What is wrong here?</p>
