// No need for an array import java.util.* // Above class, at top int min = -99; int minRep= 0; int max = -99; int maxRep= 0; Random rand= new Random(); for(int i = 0; i < 365; i++) { int x = rand.nextInt(82,529) + 1; System.out.println("Day " + i + " : " + x + " people"); if (x < min || min == -99){ min =x; } if(x == min) { minRep++; } if(x > max || max == -99) { max = x; } if(x==max) { maxRep++; } } // End of For Loop System.out.println(); System.out.println("The following days have " + max + " people: (Max)"); System.out.println(maxRep); System.out.println(); System.out.println("The following days have " + min + " people: (Min)"); System.out.println(minRep);