Home Discussion Discuss: Palindrome Number Example in Java

  • ReverseAnnonymous April 20, 2011 at 11:32 AM

    The statement in "if else" condition in reverse order.

  • SorryAnnonymous April 20, 2011 at 11:34 AM

    The previous comment from me is incorrect!!!!!!sorry

  • very good!sharan August 25, 2011 at 8:23 PM

    it is very good and dimple for beginners!!!!!!!!!! but there r a few mistakes but minor ones

  • javaanjibabu September 11, 2011 at 6:05 PM

    It's simple nice and write the program in better way it's good

  • commentkrishan kant October 11, 2011 at 1:58 PM

    i m vry thankfull to you , u hv solve my problems

  • appreciationAILEEN November 23, 2011 at 3:31 PM

    it helps us a lot,,,thank you so much for the help.

  • vic March 24, 2012 at 12:49 PM

    what's the role of "i=0" in the for loop ?

  • javamadhurendra kumar April 14, 2012 at 6:16 PM

    what is Palindrome Number.

  • PalindromeSandhya June 21, 2012 at 11:23 AM

    import java.util.Scanner; public class Palindrome { static String str2 = ""; static String comString; public static void main(String[] args) { Scanner s = new Scanner(System.in); String enteredString = s.next(); comString = enteredString; int stringLength = enteredString.length(); for (int i = stringLength - 1; i >= 0; i--) { char currentChar = enteredString.charAt(i); String str1 = Character.toString(currentChar); str2 = str2.concat(str1); } if (str2.equals(comString)) { System.out.println("Is Pallandrome"); } else { System.out.println("Not a Pallandrome"); } } }

  • niceBlaze July 15, 2012 at 11:05 AM

    nice code men. it helped me w/ my assignment about this. thanks to your code. i understand it now why its palindrome or vice versa. xD

  • javapalak July 29, 2012 at 5:19 PM

    how to run java program in dos promt

Post your Comment



Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Related Articles
Java Tips and Examples

Palindrome Number Example in Java
Palindrome Number Example in Java    ... the palindrome number and how to determine any number is palindrome or not. First of all we are going to read about the palindrome number.  This is the number 

Java Beginners

getting random number in java
getting random number in java  getting random number in java Hi everyone, i am trying to get a random number in a particular range. for example... and scaling the random number in my Java Random number eample. but for some reason 

Java Beginners

perfect number - Java Beginners
perfect number  An integer number is said to be a perfect number.... For example, 6 is a perfect number because 6 = 1+2+3. Write a method perfect that determines if parameter number is a perfect number. Use this method 

Java Beginners

Magic number Java Program
Magic number Java Program  write a program that guesses what number the user is thinking of. Below is a sample transcript: Think of a number between 1 and 255. I will guess the number you are thinking of. 1 3 5 7 9 11 13 15 17 

Java Code Examples

Java reverse number
Java reverse number In this tutorial, you will learn how to reverse a number in java. In java, you can use arithmetic operators like division operator.... There is no need to use any java api. Example import java.util.*; public class 

Java Beginners

from number to word
from number to word  i want to know weather there is any method that can be use in changing value from number to word. Example if i write ten thousand, it will automatically be written as 10000.   Java convert number 

Java Tips and Examples

Convert Number To Words
Convert Number To Words       In this example, We are going to convert number to words. Code... the string representing the number. Here is the code of this program 

Java Tips and Examples

Prime number program in java
Prime number program in java In this example you will learn how to write a program to generate and check  prime number  in java. As we know prime... or not. Example : Here is the code for generating prime number and to check the prime number 

Java-Tutorials

Prime Number program in Java
Prime Number program in Java will print the prime numbers between 1 to any given number. Prime Number is a number that is not divisible by any number other... automatically prints Prime Number starting from 1 to 50. Example of Prime Number 

General

How to format number in Java?
Learn about the code of formatting the number in Java This tutorial explains you how to format the number in Java. There are number of situations where we... Number formatting Example! $40.43 There may different ways of providing 

Java Tips and Examples

Line Number Reader Example
Line Number Reader Example       In this example we are reading  number of lines. In this example we are reading a file from system .Then we are reading number 

General

Prime Number in Java
Prime Number in Java       This Java programming tutorial will be read how to get prime number. First of all we will define a class "Prime Number". Java I/O package 

Java Tips and Examples

Prime Number in Java
Prime Number in Java       This Java programming tutorial, we will be read how to get prime number between 1 to given number. First of all we have to define a class " 

General

Java Number Format
Java Number Format      ... the format of the number. In java this is achieved by the java.text.NumberFormat class. NumberFormat is the abstract base class for all number formats 

Java Code Examples

Java Number Spiral
Java Number Spiral In this tutorial, you will learn how to create a  number spiral. A spiral array is a square arrangement of the first N2 natural... of the array. Here, we have created an example, that takes an input from the user 

JDBC

JDBC Batch SQL Update Statement Example With Return Number of Effected Rows
JDBC Batch SQL Update Statement Example With Return Number of Effected Rows: In this example, we are discuss about update statement with return number... will create a java class name BatchUpdateWithReturnUpdateRowNumber.java and import 

Java-Tutorials

Prime Number in Java
Prime Number in Java In this Java tutorial , you will learn how to write a Java program to get prime numbers between 1 to the desired number. To start with, we have defined a class "PrimeNumber" in this example. Java I/O package 

Java Tips and Examples

Determining the largest number
Determining the largest number       This example of Java programming will teach you the coding for determining the largest number amongst three. Here we have taken three 

General

Check Perfect Number in Java Program
How to Check Perfect Number in Java Program A perfect number is a positive... to the number itself. For example 6 is a perfect number as 1,2 and3 are its divisors... the number from the user and reports whether it is perfect or not. Here 

Java Technology Tutorials

Java file number of lines
Java file number of lines In this section, you will learn how to count the number of lines from the given file. Description of code: Java has provide... the lines from the file. You can see in the given example, we have created 

General

The Array Palindrome Number in Java
The Array Palindrome Number in Java       This is a Java simple palindrome number program... program. The array palindrome number arrange the array number. This session 

Java Technology Tutorials

Formatting and Parsing a Number for a Locale
of the date, time, number, or message. Java has provide different classes... example, we have format a number for the locale CANADA. The method getNumberInstance...Formatting and Parsing a Number for a Locale In this section, you will learn 

Development process Questions

prime number
prime number  get one number and check the number prime or not using if statement   Java Check Prime Number 

General

Convert String to Number
Convert String to Number       In this section, we will learn how to convert String to Number... to Number. Code Description: In this program we have taken a String of int, byte 

Development process Questions

prime number
prime number  check prime number using if statement   Java Check Prime Number 

Development process Questions

prime number
prime number  check prime number using if statement   Java Check Prime Number 

Java-Tutorials

Generating Random Number
how to create a random number and example provided here will help you easily... Generating Random Number     ... requirements. Java provides classes to help you in generation random numbers 

Java Beginners

Armstrong number
Armstrong number  I want java program for Armstrong number 

Java Beginners

prime number
prime number  write a java program for prime number 

Java-Tutorials

How to generate random number in java
How to generate random number in java In this section you will learn how to generate random number in java. Java API  provide a random class...() method is most convenient way to generate random number in java which return 

DMCA.com