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 the iterator and generic algorithms.

1942


What does the linker do?

1043


Why is main function important?

1112


Can we use this pointer inside static member function?

1072


How are virtual functions implemented in c++?

1071


What is a stack c++?

1014


Can we declare a base-class destructor as virtual?

1012


Write a program in C++ for Fibonacci series

1211


Explain the advantages of using friend classes.

1171


Define a constructor?

1051


Why can’t you call invariants() as the first line of your constructor?

1027


Write about the role of c++ in the tradeoff of safety vs. Usability?

1073


If I is an integer variable, which is faster ++i or i++?

1071


What does it mean to declare a member function as static?

1066


What is a pointer how and when is it used?

1098