Consider following code.
public class Permutations { static int count=0; static void permutations(String str, St