For this Question: <b><em>Array List In Java</em></b>

There is a list, having n integers that may have duplicates, is given. Print all unique elements in sorted order.There is an integer n is given in first line of input.
In Second line, n space separated integers are given.

<b>Constraints</b>
1 <= n <= 10<sup>4</sup>Print all unique elements in sorted order.Sample Input:
7
1 2 4 3 5 4 3

Sample Output:
1 2 3 4 5, I have written this Solution Code: // Java program for the above approach

import java.io.*;
import java.lang.reflect.Array;
import java.util.*;

public class Main {

	public static void main(String[] args)
	{
		TreeSet<Integer> st=new TreeSet<>();
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    for(int i=0;i<n;i++){
      int a=sc.nextInt();
      st.add(a);
    }
    
	  for(Integer x:st){
      System.out.print(x);
      System.out.print(" ");
    }
    System.out.println("");
    return;
	}
}
, In this Programming Language: Java, Now tell me if this Code is compilable or not?