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 a static member function access member variable of an object?

801


What is object-oriented paradigm?

863


Can we use both this () and super () in a constructor?

802


What is the main purpose of serialization in java?

806


Can we serialize singleton class?

799


What is finally and finalize in java?

823


What is nested interface?

774


What is the purpose of the file class in java programming?

769


Name few java 8 annotations ?

808


what is synchronization? : Java thread

821


Tell us something about different types of casting?

728


What is an object in java?

799


What is the super void?

712


Give me some null interfaces in java?

828


what is object slice?

1782