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

what are Access specifiers in C++ class? What are the types?

1221


Write a C++ Program to check whether a number is prime number or not?

1125


What is atoi in c++?

1072


Mention the ways in which parameterized can be invoked.

931


Is eclipse good for c++?

1041


What is flush c++?

1006


How many keywords are used in c++?

1015


What is a sequence in c++?

1009


Explain binary search.

986


What do you mean by public protected and private in c++?

1054


What is the difference between reference and pointer?

1151


How should a contructor handle a failure?

1182


What are the three forms of cin.get() and what are their differences?

1232


How do we balance an AVL Tree in C++?

1128


Why do we learn c++?

962