I have done all the tests I can think possible, and it's getting the required results.

package com.codegym.task.task07.task0721;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
/*
Min and max in arrays
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int maximum;
int minimum;
//write your code here
int[] numbers = new int[20];
for (int n = 0; n < numbers.length; n++) {
numbers[n] = Integer.parseInt(reader.readLine());
}
maximum = 0;
for (int n = 0; n < numbers.length; n++) {
if (numbers[n] > maximum) {
maximum = numbers[n];
}
}
minimum = maximum;
for (int n = 0; n < numbers.length; n++) {
if (numbers[n] < minimum) {
minimum = numbers[n];
}
}
System.out.print(maximum + " " + minimum);
}
}

maxinstead ofmin. But otherwise it's okay, I understood the principle of what you were pointing to. Thank you very much. Finally passed it.