How to write an app that reverses
I am wondering how to modify this program to reverse an integer input by a user, for example 12345 would be 54321.
here is the completed code so far (my significant other helped me out alot already) ;) he's good with Java.
I just need to fill in the blanks (or make corrections) :o
public class Reverse
public static void main(String args)
Scanner input=new Scanner(System.in);
System.out.print("Enter an Integer value" );//display message prompt
int userValue=input.nextInt();//prompt for a 5-digit integer
String = newString
for (int=i stringValue.length(); i>0; i--)
what I want to do is turn the int into a string, reverse the string and then turn it back into an int and print it. :) I am a super n00b to Java so help is greatly appreciated! the concepts kinda take some getting used to.