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
What do you mean by local class?
How will you reverse a link list without using recursion?
Explain about fail safe iterators in java?
Can we create our own wrapper class in java?
How to sort array of 0 and 1 in java?
Why we do exception handling in java and how many types of exceptions are there?
How many tetrahedral voids are there in bcc?
What do you mean by composition in java?
What is an immutable class? How to create an immutable class?
Can we rethrow the same exception from catch handler?
Why java is said to be pass-by-value ?
What is the java reflection api? Why it’s so important to have?
Explain about oops concepts.
What is the use of list in java?
What is jar?