Write the code for Palindrome ?

Answer Posted / aslam

public boolean isPaliandrome(String txtToCheck){

StringBuffer strb1 = new StringBuffer(txtToCheck).reverse();
if(txtToCheck.equals(strb1.toString()))
return true;
return false;

}

Is This Answer Correct ?    5 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we able to pass objects as an arguments in java?

782


What is a variable and constant?

775


Is array serializable java?

725


Difference between ‘is-a’ and ‘has-a’ relationship in java?

780


What does %4d mean in java?

1219


According to java operator precedence, which operator is considered to be with highest precedence?

840


What is parsing a sentence?

765


Why java is platform independent? Explain.

794


Can I uninstall java?

800


What is a line separator in java?

739


What is volatile keyword in java

881


Can a constructor be private and how are this() and super() method used with constructor?

745


What is double word?

748


What do you understand by the term singleton?

775


How can you say java is object oriented?

826