Question: using java and no arrays. please add comments 3. Write a method with the following header to display a positive integer in reverse order: public
3. Write a method with the following header to display a positive integer in reverse order: public static void reverse (int number) Call this method reverse from main, after prompting the user to enter a positive integer with up to seven (7) decimal digits, and then printing the int entered by user in reverse. Should the user enter an integer with too many digits or a negative integer (or any value that's not an integer), your program should notify the user that his or her input was not valid, and prompt the user to enter a new input. Show the output of your code for the following inputs: 42, 3456789, 10000, 35753, 10201. (Explain briefly how your program treats trailing O's, such as in input 10000.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
