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.
Try this. It can be made a lot more efficient. Next time please put at least a psuedo code.
public static void main(String args) throws IOException
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
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");
I am writing a java program that needs to execute shell commands, so I wrote a function that would take the command to execute as a string (ie: "mkdir ~/Folder1") and execute that command with the shell. Here is the function:
Runtime run = Runtime.getRuntime();
Process pr = ...
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"