Normal to recursive method due tomorrow please help!!
I need to make run() a recursive method, and i have no way of doing it. I tried many ways but cannot do it. Can someone please help me, it's due tomorrow and I've spent hours on it.
Write a program that prompts for a positive integer and displays all permutations of the odd digits of that length. Display these values in ascending order. For example, if the length is 3, your program should display:
. . .
^there shouldn't be an even digit in any number.
public class OddDigits
public static void main(String  arg)
Scanner x = new Scanner(System.in);
System.out.print("Enter a number: ");
int a = x.nextInt();
int b = 1;
public static boolean isOdd(int a)
int n =0;
while (a > 1)
if(a%2 == 0)
a = a/10;
public static void run(int a, int b)
int upLim = (int)Math.pow(10,a);
int lowLim = (int)Math.pow(10, a-1) -1;
int start = (int)Math.pow(10, a-1);
while(start < upLim)
if(isOdd(start) == true)