Wrong output in permutation

public static ArrayList getpp(String str) {
if(str.length()==0) {
ArrayList base=new ArrayList<>();
base.add("");
return base;
}

		char c=str.charAt(0);
	
	String rps=str.substring(1);
	
	ArrayList<String> recResult=getpp(rps);
	ArrayList<String> myResult=new ArrayList<>();
	for(String rrs:recResult) {
		for(int i=0;i<recResult.size();i++) {
		String s=rrs.substring(0,i)+c+rrs.substring(i);
		myResult.add(s);
	}
		
		
	}
	return myResult;