I am a student learning Java and am stuck on the last part of a homework problem. I need to write a conditional statement that prints whether the roll of the dice was a Yahtzee or not (all five dice are equal to one another). I cannot figure out how to do this since I used ints and not boolean. I know I cannot cast an int into boolean and up to this point this casting is the only way I know how to change variables. Any help would be appreciated since the ways to achieve what I am looking for have been more than I can understand at this point. This is what I have and the issue is in the second to last line.
import java.util.Random;
public class FiveDice_JLR
{
//-----------------------------------------------------------------
// Generates random numbers in various ranges.
//-----------------------------------------------------------------
public static void main(String[] args)
{
Random generator = new Random();
int die1, die2, die3, die4, die5;
die1 = generator.nextInt(6)+1;
System.out.println("Die 1: " + die1);
die2 = generator.nextInt(6)+1;
System.out.println("Die 2: " + die2);
die3 = generator.nextInt(6)+1;
System.out.println("Die 3: " + die3);
die4 = generator.nextInt(6)+1;
System.out.println("Die 4: " + die4);
die5 = generator.nextInt(6)+1;
System.out.println("Die 5: " + die5);
**if(die1==die2&==die3==die4&==die5&&);**
{
System.out.println("Yahtzee!!!!");
}
}