private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
int a,b,c=0;
a=Integer.parseInt(jTextField1.getText());
int d=a;
while(a>0)
{
b=a%10;
a=a/10;
c=c*10+b;
}
if(c==d)
System.out.print("YES");
else
System.out.print("NO");
}
Q17. To check if a string is Palindrome.