RainfallTest.java import java.util.Arrays; import java.util.Scanner; public class RainFallDetails { static String month[] = {\"January\", \"Fabruary\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\",\"October\",\"November\",\"December\"}; public static void main(String[] args) { int months[] = new int[12]; Scanner scan = new Scanner(System.in); for(int i=0; i months[i]){ min = months[i]; minIndex = i; } } System.out.println(\"The minimum rainfall is :\"+min); System.out.println(\"The minimum rainfall month is :\"+month[minIndex]); } } Output: Enter Rainfall for the month 1: 33 Enter Rainfall for the month 2: 22 Enter Rainfall for the month 3: 11 Enter Rainfall for the month 4: 44 Enter Rainfall for the month 5: 55 Enter Rainfall for the month 6: 66 Enter Rainfall for the month 7: 77 Enter Rainfall for the month 8: 88 Enter Rainfall for the month 9: 99 Enter Rainfall for the month 10: 12 Enter Rainfall for the month 11: 14 Enter Rainfall for the month 12: 15 Entered rainfall details [33, 22, 11, 44, 55, 66, 77, 88, 99, 12, 14, 15] January: 33 Fabruary: 22 March: 11 April: 44 May: 55 June: 66 July: 77 August: 88 September: 99 October: 12 November: 14 December: 15 The total rainfall is :536 The average rainfall is :44.666666666666664 The maximum rainfall is :99 The maximum rainfall month is :September The minimum rainfall is :11 The minimum rainfall month is :March Solution RainfallTest.java import java.util.Arrays; import java.util.Scanner; public class RainFallDetails { static String month[] = {\"January\", \"Fabruary\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\",\"October\",\"November\",\"December\"}; public static void main(String[] args) { int months[] = new int[12]; Scanner scan = new Scanner(System.in); for(int i=0; i months[i]){ min = months[i]; minIndex = i; } } System.out.println(\"The minimum rainfall is :\"+min); System.out.println(\"The minimum rainfall month is :\"+month[minIndex]); } } Output: Enter Rainfall for the month 1: 33 Enter Rainfall for the month 2: 22 Enter Rainfall for the month 3: 11 Enter Rainfall for the month 4: 44 Enter Rainfall for the month 5: 55 Enter Rainfall for the month 6: 66 Enter Rainfall for the month 7: 77 Enter Rainfall for the month 8: 88 Enter Rainfall for the month 9: 99 Enter Rainfall for the month 10: 12 Enter Rainfall for the month 11: 14 Enter Rainfall for the month 12: 15 Entered rainfall details [33, 22, 11, 44, 55, 66, 77, 88, 99, 12, 14, 15] January: 33 Fabruary: 22 March: 11 April: 44 May: 55 June: 66 July: 77 August: 88 September: 99 October: 12 November: 14 December: 15 The total rainfall is :536 The average rainfall is :44.666666666666664 The maximum rainfall is :99 The maximum rainfall month is :September The minimum rainfall is :11 The minimum rainfall month is :March.