My CODE IS NOT WORKING

import java.util.ArrayList;
public class permutation {
public static ArrayList perm(String str)
{
if(str.length()==0)
{
ArrayList base=new ArrayList();
base.add("");
return base;
}
char c=str.charAt(0);
String cs=str.substring(1);
ArrayList result=new ArrayList<>();
ArrayList rr=perm(cs);
for(String ss : rr)
{
for(int i=0;i<ss.length();i++)
{
result.add(ss.substring(0,i)+cs+ss.substring(i));
}
}
return result;

}
public static void main(String[] args) {

System.out.println(perm(“abc”));
}

}

PLEASE share your code after saving it on ide.codingblocks.com its very difficult to read it this way.also this adds new errors to the code

mention the type in arraylist everywhere
as
ArrayList<String> ans = new ArrayList<>();