write program for palindrome
Answer Posted / baskaran
import java.io.*;
class Polindrome1{
public static void main(String args[])
throws IOException{
String s,p;
BufferedReader obj1=new BufferedReader(new
InputStreamReader(System.in));
s=obj1.readLine();
System.out.println("Input Value:"+s);
p=new StringBuffer(s).reverse().toString();
if(s.equals(p)){
System.out.println("This Input Is
Polindrome:"+s);}
else
System.out.println("The Input Value Is Not
Polindrome");
}
}
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is pointer to array in c++?
What is type of 'this' pointer? Explain when it is get created?
Write a program in C++ for Fibonacci series
How will you call C functions from C ++ and vice-versa?
What is function overloading in C++?
What are the steps in the development cycle?
Do the parentheses after the type name make a difference with new?
How would you use qsort() function to sort an array of structures?
What character terminates all character array strings a) b) . c) END
Does c++ have arraylist?
Describe the advantage of an external iterator.
Can I run c program in turbo c++?
What is the difference between new() and malloc()?
What is split a string in c++?
How is new() different from malloc()?