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



Home Answers Viewqa Java-Beginners Java palindrome program code

Have Programming Question? Ask it here!
 
 
 


safa
Java palindrome program code
1 Answer(s)      6 years and a month ago
Posted in : Java Beginners


Can anyone Explain me the Java palindrome with the help of an example or program code in Java.
Thanks in advance!!


Advertisement
View Answers

April 12, 2008 at 8:29 PM


hi


import java.io.*;

public class PalindromeExample{
public static void main(String [] args){
try{
BufferedReader object = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter number");
int num= Integer.parseInt(object.readLine());
int digit1, digit2, digit3, digit4, digit5;
int number=0;
digit1 = number % 10;
number = (number - digit1) /10;
digit2 = number % 10;
number = (number - digit2) /10;
digit3 = number % 10;
number = (number - digit3) /10;
digit4 = number % 10;
number = (number - digit4) /10;
digit5 = number % 10;
if ((digit1 == digit5) && (digit2 == digit4)){
System.out.print("Number is palindrome!");
}
else{
System.out.println("Number is not palindrome!");
}
}
catch(Exception e){
System.out.println("Out of range!");
}
}
}



------------------------------
read for more information.

http://www.roseindia.net/java/


Related Tutorials/Questions & Answers:
complete the code (palindrome) - Java Beginners
complete the code (palindrome)  Write a program that checks if a word is palindrome. A word is said to be palindrome if it reads the same forward... to left. Words like "tooth" and "feet" are not palindromes. The program prompts
java palindrome
java palindrome  sir i need java program to print 1)integer palindrome 2)string palindrome
Advertisements
Palindrome program in Java
Palindrome program in Java helps programmers to determine if a number.... The logic used in Java program behind finding a number or sting is palindrome... of Palindrome program in Java: import java.io.*; public class Palindrome { public
Java Program to check Palindrome
Java Program to check Palindrome In this section, you will learn about palindrome in java and how to check any number that is palindrome or not. First..., then it is called palindrome number otherwise it is not. Description of program
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
palindrome - Java Beginners
+ " is not a palindrome"); } } } For more information on Java...palindrome  use array to write a program that checks if a word is palindrome. A word is said to be palindrome if it reads the same forward
Palindrome
Palindrome  program to verify palindrome
palindrome - Java Beginners
palindrome  example of java program if it is a palindrome or not palindrome   Hi friend, Example to check the number is a palindrome...){ System.out.print("Number is palindrome!"); } else
palindrome
palindrome  program to find the given string is palindrome or not   Hi Friend, Try the following code: import java.util.*; public class...]; } if(st.equalsIgnoreCase(reversedSt)){ System.out.println("String is palindrome
palindrome
palindrome  write a program to print palindrome numbers between 500 to 700
To find palindrome no in a file - Java Beginners
To find palindrome no in a file  hi all i am having a problem...I wanted to write one java program where i have to count the no of palindrome...;Hi Prashant, Use the following code: import java.util.Scanner; import
palindrome - Java Beginners
palindrome  Write a program to find whether a given string is a palindrome or not  Hi Friend, Try the following code: import java.util.*; public class CheckPalindrome{ public static void main(String[] args
palindrome - Java Beginners
palindrome in java code  I need an example of palindrome in Java ...;& (digit2 == digit4)){ System.out.print("Number is palindrome!"); } else{ System.out.println("Number is not palindrome!"
Java: Example - Palindrome test
Java: Example - Palindrome test //========================================================= isPalindrome // This method returns 'true' if the parameter // is a palindrome, a word that is spelled the // same both
Program to display palindrome numbers between some range
Program to display palindrome numbers between some range  Hi!I want a java program to display palindrome numbers between 100 to 1000.can you please explain me the logic with an example   import java.util.*; public
palindrome - Java Beginners
palindrome  import java.io.*; class Palindrome...; } } this program is showing errors while compilation. it says identifier expected in 4th line of the program... help me out of it   
PALINDROME
PALINDROME  how to find palindrome of a number WITHOUT using a string ??   Hi Friend, Try the following code: import java.util.... == reversedNumber){ System.out.print("Number is palindrome!"); } else
palindrome - Java Beginners
palindrome  determines whether or not it is a palindrome. if the number is not five... == digit4)){ System.out.print("Number is palindrome!"); } else{ System.out.println("Number is not palindrome!"); } } catch(Exception e  
palindrome
palindrome  how to write in string of palindrome?   import... is palindrome"); } else{ System.out.println("String is not palindrome
palindrome
palindrome  how to write in string of palindrome   import... is palindrome"); } else{ System.out.println("String is not palindrome
Finding all palindrome prime numbers - Java Beginners
Finding all palindrome prime numbers  How do i write a program to Find all palindrome prime numbers between two integers supplied as input (start and end points are excluded
java program code
java program code  can any one write a program (class) which will have two methods Fibonacci and Factorial, which will be a void and a return respectively. i will be glad if it can have a good display results
program code - Java Beginners
program code  Design and write a Java application that takes as input... to either Q or Z. For the two letters, your application should display a message..., This code will be helpful to you in solving your problem. import java.util.
Palindrome Number Example in Java
!".  Here is the code of this program... Palindrome Number Example in Java    ... the palindrome number and how to determine any number is palindrome or not. First of all we
source code program - Java Beginners
source code program  I need the source code for a program that converts temperatures from celsius to fahrenheit and vice versa, as well as converting kilometers to miles and vice versa using Java "classes".  Hi
program code for this question - Java Beginners
program code for this question  QUESTION 2: Address Information..., are kept in a file. Your task: Write a Java application LookUp.java that acts as an IP lookup tool. The program reads a search phrase (which could either be an IP
Small program code - Java Beginners
Small program code  Develop the echo server and the echo client program that display whatever is typed in the server on to the client
program code for this question - Java Beginners
program code for this question  QUESTION 1: Electricity Bill Tshubang...: Write a Java application, ProduceBills.java, that reads the name of the file.... Program should send each customer?s bill to a text file whose name is the customers?s
inheritance code program - Java Beginners
inheritance code program  class Point { private int x ; private int y; public Point (int x , int y) { this.x = x; this.y =y...: http://www.roseindia.net/java/master-java/interface.shtml Thanks. Amardeep
To check a palindrome number?
To check a palindrome number?  program to check a number is palindrome or not using recursion?(wihout converting to string
prime palindrome
prime palindrome  Hi I want to write a program in pascal that ask a user to input a number, the program then list all the prime number that are palindrome below the number entered. thks
prime palindrome
prime palindrome  Hi I want to write a program that ask a user to input a number, the program then list all the prime numbers that are palindrome below the number entered. In pascal language Thanks
Program to find no of metrics in a file ----- Java code
Program to find no of metrics in a file ----- Java code  Hi Friends, I got a task to calculate the metrics of a program, like to find the no of SELECT and INSERT statement is a program. With that I have to even calculate
jdbc connection to java program code - JDBC
jdbc connection to java program code  i want a simple java program that which communicates with oracle database like creating table,insert values and update records in database and show in program output? please take a simple
doubt in my program code - Java Beginners
doubt in my program code  i have developed a web browser with the help of standard widget toolkit(swt) and java. i creted some buttons such as GO... the code i developed i can send u to ur mail if u give ur mail id
Please write code for this program in java and Explain it ? pl'sssssssss
Please write code for this program in java and Explain it ? pl'sssssssss ... findmaxdinosaur (int[] years); Java : public int findMaxdinosaur (int[] years);    wow i got also same program. ok leave it. in this program they are passing
code for program
code for program  hello,I am new to java and need to get the code for a program,i've been trying all sorts of code and nothing works any help would be appreciated.Below is what the program should output with the user's input
program code - Java Server Faces Questions
program code  hai i am meyis i need a jsp program code for date generation.(mssql-back end) Fields are fromdate and todate both field are datetime..., Plz explain the below code line with source code to solve the problem. "how
Please provide the java code for the given program.
Please provide the java code for the given program.   We need an application for managing an educational institute. That application should provide...: StudentAddr: StudentDob: Email: Course ALL Java C C++ Oracle Fees: Duration: Faculty
program code
program code  I need to get the code for the following,the user's input are enclosed in curly brackets,thank you. HARDWARE ITEMS CODE DESCRIPTION... 23} ADDRESS-2: {Building 8} ADDRESS-3: {Winchester} POST CODE: {89763} ENTER
code for a program
code for a program   Write a program which has 2 numbers. There should be an option to add, multiply, divide and subtract these numbers a. If user opts "A" - Add the 2 numbers b. If user opts "S" - Subtract the numbers c
program code
program code  I want a program that accepts a word from TextField and check with multiple .csv file and displays the snippets from csv file into TextArea. Please help me
program code
program code  login and registration form for shopping cart using struts-hibernate with oracle database connection
Exercise - Palindrome
Java: Exercise - Palindrome Problem Write a method which returns true if the string parameter is a palindrome. A palindrome is any "word" which... return false if the argument is not a palindrome. Signature
source code in java for a program using class - Java Beginners
source code in java for a program using class  Dear sir/madam i want source code in java for following program: WAP which creates a class accountthat stores customer name,account number and type of account.From this derive
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).  ...]; } if(st.equalsIgnoreCase(reversedSt)){ System.out.println("String is palindrome
i need program or code for this program
i need program or code for this program  out should be in this form 1 2 3 4 5 6 3 5 7 9 11 8 12 16 20 20 28 36 48 64 112
Pleae help me to give logic and code for this program - Java Beginners
Pleae help me to give logic and code for this program  Write a function that given the string ?original? create a new string ?dramatic? that has two...://www.roseindia.net/java/beginners/StringReverseUsingStringUtils.shtml
program code - JSP-Servlet
program code  what is the program code for LOGINFORM USING SERVLETS? RESPOND SOON
program code - JSP-Servlet
program code  what is the program code for LOGINFORM USING SERVLETS? RESPOND SOON
 

 

 

DMCA.com