Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

When do we run a shell in the unix system?

1019


What is iomanip c++?

1011


What are the comments in c++?

944


I want to write a C++ language program that: 1. Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text file. The program should work for squares of all side sizes between 1 and 20.

2736


What are the rules about using an underscore in a c++ identifier?

1093


Where can I run c++ program?

1008


If you want to share several functions or variables in several files maitaining the consistency how would you share it?

929


What is meant by a delegate?

1032


What is the difference between a "copy constructor" and an "assignment operator" in C++?

1016


What is pure virtual function? Or what is abstract class?

1005


Write a Program for dynamically intialize a 2 dimentional array. Eg:5x20, accept strings and check for vowels and display the no.finally free the space allocated .

1090


Write about the use of the virtual destructor?

959


What is the use of turbo c++?

1011


What is the difference between map and hashmap in c++?

1038


What are the important differences between c++ and java?

1086