Problem:
Question 1: What if the main method is declared as private?
Question 2: Write a recursive method to print all the permutations of a string. For instance, for a string abc, the printout is: abc acb bac bca cab cba. Use the following two methods, the second one being a helper method:
- public static void displayPermutations(String string)
- private static void displayPermutations(String prefix, String string)
Please Explain don't just write the answer.