Next Palindrome

import java.util.;
public class Main {
public static void pal(int a){
int aa =a;
int sum=0;
while(a>0){
sum = sum
10 + a%10;
a = a/10;
}
if(sum==aa){
System.out.println(sum);

         }else{
             pal(aa+1);
         }
		
}
public static void main (String args[]) {
    Scanner s = new Scanner(System.in);
    int t = s.nextInt();
    int k[] = new int[t];
    for(int i=0;i<t;i++){
      k[i] = s.nextInt();
    }
     for(int i=0;i<t;i++){
    pal(k[i]+1);
    }
}

}

sir why i got run time error for this

@ashishbindra2,
What exactly was the question? Because your code is not relevant to the video you have asked under.

Also, can you please share your code through https://ide.codingblocks.com/ ?
Steps:

  1. Select the correct language. Copy your code.
  2. Press ctrl + s and click on save.
  3. Share the url to the code.