how to write an application that reads in a five digit integers and determine whether the number is as palindromes or not e.g 12321,11611.If the number is not five digit long, display an error dialog, allow the user to enter a new value.

With a text editor, of course.

Why don't you write a bit of pseudocode that outlines the general process the program must follow to complete the needed steps and post it here if you need some help with portions of it?

Try this. It can be made a lot more efficient. Next time please put at least a psuedo code.

import java.io.*;
class Pal
{
public static void main(String args[]) throws IOException
{
int num,rev=0,temp;
boolean flag=true;
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
while(flag)
{
System.out.println("Enter a number:");
num=br.readline();
//To check if it is a 5 digit number
if(num/10000>=1 && num/10000<10)
flag=false;
}
temp=num;
//Reversing the number
while(num!=0)
{
rev=rev*10+num%10;
num=num/10;
}
if(rev==temp)
System.out.println("It is a palindrome");
else
System.out.println("Not palindrome");
}
}
Comments
Don't just hand out homework anwers.

Try this. It can be made a lot more efficient. Next time please put at least a psuedo code.

Handing students who have shown no effort at all on their assignment the answer is against the spirit of this forum, as evidenced by this prominent post at the top of the forum: http://www.daniweb.com/forums/announcement9-2.html

You are rewarding laziness and fostering incompetence.

That's a statement, not a question. Start a new thread if you have a specific question about the code that you have written so far.

If you haven't written any code yet then you haven't really put any effort into the assignment and probably shouldn't expect anyone to else to expend any time on it either.

given the already provided answer, did he even read the rest of the thread?
Does he even know what a palindrome is?

This article has been dead for over six months. Start a new discussion instead.