For this Question: You are given a string <i>s</i> consisting of lowercase English letters. Find the number of different palindromes you can make by changing <b>exactly</b> one charecter from the string to some other lowercase English letter.The first and single line contains string <i>s</i> (1 &le; |<i>s</i>| &le; 10).Print the number of different palindromes you can make by changing <b>exactly</b> one charecter from the string to some other lowercase English letter. Sample Input 1
abbb

Sample Output 1
2

Explanation:
The possible palindromes are:
    1. abba
    2. bbbb

========================================================================

Sample Input 2
abba

Sample Output 2
0

, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void main (String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        char str[] = br.readLine().toCharArray();




        int ans = 0;
        char arr[] = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
        Set<String> set = new HashSet<>();
        for(int i=0;i<str.length;i++){
            char p = str[i];
            for(char ch:arr){
                if(ch==p) continue;
                str[i] = ch;
                if(isPallindrome(str)){
                    if(set.contains(String.valueOf(str))==false){
                        set.add(String.valueOf(str));
                        ans++;
                    }
                }
                str[i] = p;
            }
        }
        System.out.println(ans);


	}
    static boolean isPallindrome(char[] str){

        int i = 0;
        int j = str.length-1;

        while(i<j){

            if(str[i]!=str[j]) return false;
            i++;
            j--;
        }
        return true;

    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?