What if the main method is declared as private


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.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: What if the main method is declared as private
Reference No:- TGS0891341

Expected delivery within 24 Hours