Выдает следующую ошибку: com/javarush/task/task07/task0721/Solution.java:15: error: unreported exception java.lang.Exception; must be caught or declared to be thrown int[] nums = getInts();
package com.javarush.task.task07.task0721;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.Exception;
/*
Минимаксы в массивах
*/
public class Solution {
public static void main(String[] args) throws IOException {
int maximum = 0;
int minimum = 0;
int[] nums = getInts();
int zero = nums[0];
for(int i = 0; i < nums.length; i++){
if(zero < nums[i]){
maximum = nums[i];
}
else{
minimum = nums[i];
}
System.out.print(maximum + " " + minimum);
}
}
public static int[] getInts() throws Exception{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int[] nums = new int[20];
for(int a = 0; a < 20; a++){
nums[a] = Integer.parseInt(reader.readLine());
}
return nums;
}
}