For this Question: Given an array A[ ] of size N containing positive integers, find maximum and minimum elements from the array.The first line of input contains an integer T, denoting the number of testcases. The description of T testcases follows. The first line of each testcase contains a single integer N denoting the size of array. The second line contains N space-separated integers denoting the elements of the array.

Constraints:
1 <= T <= 100
1 <= N <= 10^5
1 <= A[i] <= 10^7For each testcase you need to print the maximum and minimum element found separated by space.Sample Input:
2
5
7 3 4 5 6
4
1 2 3 4

Sample Output:
7 3
4 1
, I have written this Solution Code: 
import java.io.*;
import java.util.*;
class Main
  {

	public static void main(String[] args)throws IOException {
		BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
        int t = Integer.parseInt(read.readLine());

		while (t-- > 0) {

			int n = Integer.parseInt(read.readLine());
			int[] arr = new int[n];

            String str[] = read.readLine().trim().split(" ");
            for(int i = 0; i < n; i++)
            arr[i] = Integer.parseInt(str[i]);

            findMinMax(arr, n);
            System.out.println();
        }
    }
    public static void findMinMax(int arr[], int n)
    {
        int min = Integer.MAX_VALUE;
        int max = Integer.MIN_VALUE;
        
        for(int i = 0; i < n; i++)
        {
            min = Math.min(arr[i], min);
            max = Math.max(arr[i], max);
        }
        
        System.out.print(max + " " + min);
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?