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

What is generic type?

572


What are the differences between throw and throws?

530


What is finally and finalize in java?

592


How does linkedlist work in java?

508


What are the various access specifiers in java?

565






What is difference between public static and void?

483


What are the access modifiers available in java?

562


What is the access scope of a protected method?

562


What is the do while loop syntax?

553


Write code of any action class?

546


What is the parse method in java?

564


How many bytes is a char in java?

528


How transient variable is different from volatile variable?

562


Is alive in java?

506


Explain access specifiers?

657