For this Question: Two strings are completely different if the characters of one string cannot be rearranged to form the other string. Given a string find the number of completely different substrings of the string.The first line of the input contains a string S.

<b>Constraints:</b>
1 <= |S| <= 100
The string contains only lowercase English letters.The output should contain number of completely different substrings.Sample Input
abc

Sample Output
6

Sample Input
aaa

Sample Output
3, 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));
		String str=br.readLine();
		int len=str.length();
		HashSet<String> set=new HashSet<>();
		char arr[]=null;
		for(int i=0;i<len;++i)
		{
			for(int j=i+1;j<=len;++j)
			{
				arr=str.substring(i,j).toCharArray();
				Arrays.sort(arr);

				set.add(new String(arr));
			}
		}
		System.out.print(set.size());
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?