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
Does java isempty check for null?
Should a main method be compulsorily declared in all java classes?
Which list does not allow duplicates in java?
When does an object becomes eligible for garbage collection in java?
Which collection is ordered in java?
How hashset works internally in java?
Is boolean a data type in java?
Give some features of interface?
How do you sort a list in java?
What are three advantages of using functions?
What is singleton class example?
How to display names of all components in a Container?
What is the largest long allowed by java?
What is the base class for error and exception?
How do you square a number in java?