Generate all permutations of a certain length -- no repeating characters

I am trying to use recursion to find all n length permutations of a 6-letter string.

Given the string "abcd" and n = 3 it'd generate abc, abd, acd, acb, adb, adc, bcd, bca, bac, bad, bda, bdc, etc.

My code currently only generates all string length permutations

  static void printPermutn(String str, String ans) 
  { 

        if (str.length() == 0)
        { 
            System.out.println(ans); 
            return; 
        } 

        for (int i = 0; i < str.length(); i++) 
        { 
            char ch = str.charAt(i); 
            String ros = str.substring(0, i) +  
                         str.substring(i + 1); 
            printPermutn(ros, ans + ch); 
        } 
    }