Require some help

I am working on a program to roll a set of dice 1000 times and count the occurences of the doubles. I am also required to count the occurences of each of the doubles but I am getting an error on compile my code is:

publicclass TestDice

{

publicstaticvoid p(String s)

{

System.out.print(s);

}

publicstaticvoid main(String[] args)

{

PairOfDice dice;

int noRolls,doubles=0;

int bin1=0;

dice =new PairOfDice();

p("\n\n");

for (noRolls=0; noRolls<100; noRolls++)

{

dice.roll();

p("" + dice.getDice1() +"," + dice.getDice2() +"\t");

if(dice.getDice1() == dice.getDice2())

doubles++;

if(dice.getDice1() && dice.getDice2() == 1)

bin1++;

}

p("\n\nThere was " + doubles +" Doubles \n\n");

p("\n\nThere was " + bin1 +" Double 1's \n\n");

}

}

and the compliler error is:

Compiler Output

TestDice.java:28: operator && cannot be applied to int,boolean

if(dice.getDice1() && dice.getDice2() == 1)

^

1 error

--

any help on this would be truly appreciated

[2063 byte] By [JP_Traininga] at [2007-10-2 17:09:20]
# 1
Please read the error messages and act on them, they are normally quite clear - as this one is. It's telling you you're misusing the "&&" operator. Read this tutorial to find out correct usage. http://java.sun.com/docs/books/tutorial/java/nutsandbolts/relational.html
ChuckBinga at 2007-7-13 18:24:12 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...