Palindrome Exception
Palindrome Exception
import java.util.*;
while (n > 0) {
c = n % 10;
s = s * 10 + c;
n = n / 10;
}
return s;
}
for(Integer i:list2){
int re=evennum(i);
if(i==re){
try{
throw new PalindromeException(i+ " is a palindrome");
}catch(Exception e){
System.out.println(e);
}
}
else{
System.out.println(re);
}
}
}
}