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

There are n integers given. 
<ul>
<li>Create an ArrayList</li>
<li>Add elements</li>
<li>Print the elements of arraylist.</li>
</ul>There is an integer n is given in first line of input.
In Second line, n space separated integer are given.

<b>Constraints</b>
1 <= n <= 10<sup>5</sup>
Print the elements of arraylist.Sample Input:
5
1 2 3 4 5

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

import java.io.*;
import java.util.*;

public class Main {

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