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
How can we make sure main() is the last thread to finish in java program?
What are the different data types in java?
What is difference between float and double?
What is the difference between @before and @beforeclass annotation?
How can I right-justify a string?
How do I stop concurrentmodificationexception?
Explain the meaning of java applet.
Is null an object in java?
Is a char always 1 byte?
Can a final variable be manipulated in java?
Difference between ‘>>’ and ‘>>>’ operators in java?
Why webdriver is an interface?
Can we override private method in java?
How can we access some class in another class in java?
When will you define a method as static in Java?