For this Question: Given an array Arr of N +1 integers containing N different elements, your task is to print the array without the repeating element in it.First line of input contains a single integer N, the next line contains N +1 space separated integers containing values of Arr.

Constraints:-
1 < = N < = 1000
1 < = Arr[i] < = 10<sup>5</sup>Print the array without the duplicate element.Sample Input:-
5
1 2 3 4 5 1

Sample Output:-
1 2 3 4 5

Sample Input:-
5
2 4 5 5 9 8

Sample Output:-
2 4 5 9 8, 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));
		int n=Integer.parseInt(br.readLine().trim());
		String str[]= br.readLine().trim().split(" ");
		HashSet <String> hs=new HashSet<>();
		for(String s:str){
			if(!hs.contains(s)){
				hs.add(s);
				System.out.print(s+" ");
			}
		}
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?