For this Question: You are given an array A of size N. In one move, you can choose two indices i, j (1 <= i, j <= N) such that A<sub>i</sub>+A<sub>j</sub> is odd and swap A<sub>i</sub> and A<sub>j</sub>. Find the lexicographically smallest array you can obtain after any number of operations.The first line of the input contains a single integer N.
The second line of the input contains N space seperated integers.

Constraints:
1 <= N <= 10<sup>5</sup>
1 <= A<sub>i</sub> <= 10<sup>9</sup>Print N space seperated integers, the lexicographically smallest array you can obtain after any number of operations.Sample Input:
3
5 2 8

Sample Output:
2 5 8

Explaination:
We can swap 5 and 2 as their sum is odd., I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
    static void lexicographically_smaller(int arr[],int n){
        int odd = 0, even = 0;
        for (int i=0;i<n;i++)
        {
            if(arr[i]%2==1)
            odd++;
            else
            even++;
        }
        if (odd>0 && even>0)
        Arrays.sort(arr);
        for(int i=0;i<n;i++)
        System.out.print(arr[i]+" ");
    }
    public static void main (String[] args) {
     Scanner sc=new Scanner(System.in);
     int n= sc.nextInt();
     int arr[]=new int [n];
     for(int i=0;i<n;i++){
         arr[i]=sc.nextInt();
     }
        lexicographically_smaller(arr, n);
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?