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
How to access a variable of the structure?
What is an arraylist c++?
How is modularity introduced in C++?
What is a driver program?
What is binary object model?
Incase of a function declaration, what is extern means?
How do you define a class in c++?
If you push the numbers (in order) 1, 3, and 5 onto a stack, which pops out first a) 1 b) 5 c) 3
What should main() return in c and c++?
Why namespace is used in c++?
What function initalizes variables in a class: a) Destructor b) Constitutor c) Constructor
What does count ++ do in c++?
What is a storage class? Mention the storage classes in c++.
the maximum length of a character constant can be a) 2 b) 1 c) 8
Can we use this pointer inside static member function?