For this Question: The product sum of two equal length arrays num1 and num2 is equal to the sum of a[i] * b[i] for all 0 <= i < a.length (0- indexed).
For example, if num1 = [1, 2, 3, 4] and num2 = [5, 2, 3, 1], the product sum would be 1*5 + 2*2 + 3*3 + 4*1 = 22.
Given two arrays num1 and num2 of length n, return the minimum product sum if you are allowed to rearrange the order of the elements in num1.The first line of the input contains the n (size of the array)
The Second line of the input contains the array num1.
Next line of the input contains the array num2.

<b>Constraints</b>
1 <= n <= 1e5
1 <= num1[i], num2[i] <= 100Print the minimum product sum.Sample Input 1:
4
5 3 4 2 
4 2 2 5

Sample Output 1:
40

Explanation :
We can rearrange num1 to become [3, 5, 4, 2]. The product sum of [3, 5, 4, 2] and [4, 2, 2, 5] is 3*4 + 5*2 + 4*2 + 2*5 = 40., I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
    public static void main (String[] args) throws IOException {


        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        int n = Integer.parseInt(st.nextToken());
        int[] num1 = new int[n];
        int[] num2 = new int[n];
        int i, ans=0;
        st = new StringTokenizer(br.readLine());
        for(i=0;i<n;i++)
            num1[i] = Integer.parseInt(st.nextToken());
        st = new StringTokenizer(br.readLine());
        for(i=0;i<n;i++)
            num2[i] = Integer.parseInt(st.nextToken());






        Arrays.sort(num1);
        Arrays.sort(num2);






        for(i=0;i<n;i++)
            ans+= num1[i]*num2[n-i-1];

        System.out.println(ans);
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?