Write a program to ask the user to either select 1 to print


Write a program to ask the user to either

Select 1 to print the digits in an integer reversely

Select 2 to print the characters in a string reversely using a switch case, your program will either

1- call the recursive method that displays an int value reversely on the console using the following header public static void reverseIntDisplay(int value) for example, reverseIntDiplay(12345) displays 54321

2- call the recursive method that displays a String value reversely on the console using the following header public static void reverseStringDisplay (String value) for example, reverseStringDisplay ("abcd") displays dcba

Write a test program the prompts the user to enter his/her choice then an integer or a string and then displays its reversal.

Solution Preview :

Prepared by a verified Expert
History: Write a program to ask the user to either select 1 to print
Reference No:- TGS02940226

Now Priced at $10 (50% Discount)

Recommended (94%)

Rated (4.6/5)