Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners java program 12
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Suresh Shahapurkar
java program 12
1 Answer(s)      3 years and a month ago
Posted in : Java Beginners


Write a java program to verify whether the given number is palindrome or not by taking from input Buffer reader(console).


Advertisement
View Answers

August 23, 2011 at 11:34 AM


import java.io.*;
public class CheckPalindrome{
    public static void main(String[]args) throws Exception{
    BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    System.out.print("Enter String: ");
    String st=br.readLine();
    String str[]=st.split("");
    String reversedSt="";
    for(int i=str.length-1;i>=0;i--){
        reversedSt+=str[i];
    }
    if(st.equalsIgnoreCase(reversedSt)){
    System.out.println("String is palindrome");
    }
    else{
        System.out.println("String is not palindrome");
      }
    }
}


Related Tutorials/Questions & Answers:
java program 12
java program 12  Write a java program to verify whether the given number is palindrome or not by taking from input Buffer reader(console).   import java.io.*; public class CheckPalindrome{ public static void main
Q, 12 WAP to calculate addition of two distances in feets and inches using objects as functions arguments in java
Q, 12 WAP to calculate addition of two distances in feets and inches using objects as functions arguments in java  Q, 12 WAP to calculate addition of two distances in feets and inches using objects as functions arguments in java
Advertisements
Chapter 12. Exceptions
Chapter 12. ExceptionsPrev Part I. Exam Objectives Next    Chapter 12. ExceptionsIdentify correct and incorrect statements or examples about exception handling
java program
java program  write a java program to get current date and time in the following format: current year is:2007 current month is:12 current date is:23 current hour in 12 hour format is:6 current hour in 24 hour format is:18 current
java program for
java program for   java program for printing documents,images and cards
Java program
Java program  I'm having troubles writing a program that upon entering your height in inches it changes your height to feet and inches, and then also...; double inch = (cm/2.54) - ((int)feet * 12); System.out.println
Java Program
Java Program  A Java Program that print the data on the printer but buttons not to be printed
a Java program
a Java program    Write a Java program to print even numbers from 2 to 1024? Write a Java program to print ? My Name is Mirza? 100 times? Write a Java program to print Fibonacci Series? Write a Java program to reverse a number
java program
java program  write a program to print 1234 567 89 10
loop code to print the Pyramid: 1 1234 12 123 123 12 1234 1
loop code to print the Pyramid: 1 1234 12 123 123 12 1234 1  Hi, I want to know how the code to print the pyramid below works. It uses nested for loops. Pyramid: 1 1234 12 123 123 12 1234 1
java program
java program  Write a java program to do matrix addition operation On two given matrices
java program
java program  Write a java program to find the number of Positive numbers in m* n matrix
java program
java program  Write a program to create an applet and display The message "welcome to java
java program
java program  java program to implement the reflection of a particular class details like constructor,methods and fields with its modifiers
Java Program
Java Program  java program to insert row in excel sheet after identifying an object
java program
java program  write a java program to display array list and calculate the average of given array
java program
java program  write a java program to display array list and calculate the average of given array
java program
java program  write java program for constructor,overriding,overriding,exception handling
java program
java program  how to write an addition program in java without using arithematic operator
java program
java program  Write a program to demonstrate the concept of various possible exceptions arising in a Java Program and the ways to handle them.  ... in Java
java program to convert decimal in words
java program to convert decimal in words  write a java program to convert a decimal no. in words.Ex: give input as 12 output must be twelve
java program
java program  write a java program to compute area of a circle.square,rectangle.triangle,volume of a sphere ,cylinder and perimeter of cube using method over riding
java program
java program  write a java program to compute area of a circle.square,rectangle.triangle,volume of a sphere ,cylinder and perimeter of cube using method over riding
java program
java program  write a program to create text area and display the various mouse handling events
java program
java program   Write a program to find the difference between sum of the squares and the square of the sums of n numbers
program in java
program in java  write a reverse program in java using string buffer.the input and out put as follows. input- hi good mornig out put-ih doog ginrom
Java program
Java program  Write a program which performs to raise a number to a power and returns the value. Provide a behavior to the program so as to accept any type of numeric values and returns the results
java program
java program  . Develop the program calculatePipeArea. It computes the surface area of a pipe, which is an open cylinder. The program accpets three values: the pipes inner radius, its length, and the thickness of its wall
java program
java program  . Write a program which performs to raise a number to a power and returns the value. Provide a behavior to the program so as to accept any type of numeric values and returns the results
java program
java program  Develop the program calculatePipeArea. It computes the surface area of a pipe, which is an open cylinder. The program accpets three values: the pipes inner radius, its length, and the thickness of its wall
java program
java program   A B C D E F F E D C B A A B C D E E D C B A A B C D D C B A A B C C B A A B B A A A java program to display above triangle
Advertisements
 

 

 

DMCA.com