请问这道面试题的解决思路是什么?

题目:把一个数组里的数组合全部列出

代码是:
[code=java]public class Test7_1_1 {
public static void main(String[] args) throws Exception{
String[] array=new String[]{
"1","2","3","4"
};
listAll(Arrays.asList(array),"");
}
public static void listAll(List candidate,String prefix){
System.out.println(prefix);

    for(int i=0;i<candidate.size();i++){
        List temp=new LinkedList(candidate); 
        listAll(temp,prefix+temp.remove(i));
    }
}

}[/code]

书上没有讲解,我对这个问题的解决思路无法理解。
哪位大神能给我讲讲解决思路?

利用递归,逐步分解,最后求得所有组合