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 are Access specifiers in C++ class? What are the types?
Write a C++ Program to check whether a number is prime number or not?
What is atoi in c++?
Mention the ways in which parameterized can be invoked.
Is eclipse good for c++?
What is flush c++?
How many keywords are used in c++?
What is a sequence in c++?
Explain binary search.
What do you mean by public protected and private in c++?
What is the difference between reference and pointer?
How should a contructor handle a failure?
What are the three forms of cin.get() and what are their differences?
How do we balance an AVL Tree in C++?
Why do we learn c++?