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.

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.out.println("Enter a number:");
//To check if it is a 5 digit number
if(num/10000>=1 && num/10000<10)
//Reversing the number
System.out.println("It is a palindrome");
System.out.println("Not palindrome");
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:

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.