// } // example array System.out.println("Has small straight: " + hasSmallStraight(dice)); System.out.println("Has large straight: " + hasLargeStraight(dice)); }}```Here's how the code works:1. First, we sort the array of dice rolls in ascending order using `Arrays.sort()`.2. In the `hasSmallStraight()` method, we iterate through the sorted array and check if four consecutive numbers appear. We do this by checking if the current element plus 1, 2, and 3 are equal to the next three elements in the array. If we find a match, we return `true`.3. In the `hasLargeStraight()` method, we do a similar check,