I need to implement a recursive method printDigits that takes an integer num as a parameter and prints its digits in reverse order, one digit per line.
This is what
public static void reversDigits(long number) { System.out.println(number % 10); if (number >= 10) { reversDigits(number / 10); } }
This is shortest/simplest version so far;)