public class HighestHandProgram { // Returns true if the 1st hand is higher in total than the 2nd hand public static boolean isHigher(int[] hand1, int[] hand2) { int total1 = 0, total2 = 0; for (int i=0; i total2; } public static void main(String[] args) { int[] cards1 = {2, 7, 4, 9, 13}; int[] cards2 = {6, 1, 8, 7, 10}; int[] cards3 = {3, 2, 12, 9, 11}; if (isHigher(cards1, cards2)) if (isHigher(cards1, cards3)) System.out.println("Hand 1 is the highest"); else System.out.println("Hand 3 is the highest"); else if (isHigher(cards2, cards3)) System.out.println("Hand 2 is the highest"); else System.out.println("Hand 3 is the highest"); } }