We would check for the palindrome condition if yes we print True else False
StringBuffer XA = new StringBuffer ( xa ) ; XA . reverse ( ) ; StringBuffer XB = new StringBuffer ( xb ) ; XB . reverse ( ) ; if ( xa == XA . toString ( ) || xb == XB . toString ( ) ) { return true ; } } return false ; }