Task #1 Develop a method to reverse an integer (as written in decimal form)Develop a method with the prototype public static int reverse (int input) using any of the previous three methods you...

Task #1 Develop a method to reverse an integer (as written in decimal form)Develop a method with the prototype public static int reverse (int input) using any of the previous three methods you developed for reversing a string. Note that, • For a negative integer, the result should also be negative with the digits reversed, i.e., your method should return -321 when presented with input -123. • You can make use of the toString() method available to any object. However, wrapper classes are needed for this, while operating on a primitive variable such as int. • The reconversion is easily achieved by the parse family of methods also available in the wrapper class.
Oct 04, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here