Compilation error

the code is running on ide but showing compilation error .

@shudhanshu20092001_af6f20d24c617008 There are few mistake that you have made :
i) In the keypad function in the if statement at the start you have used
ArrayList base=new ArrayList();
You have to put Arrow brackets before parenthesis like this :
ArrayList base=new ArrayList<>();
ii) You have added double space in between the output elements. So in the main function when you’re printing dont use space just print the element.
iii) No. of permutations should be in the next line so after the printing loop ends use and empty Syso Statement to move cursor to next line and then list.size();
Corrected code :

import java.util.*;
public class Main {
    public static void main(String args[]) {
     Scanner sc=new Scanner(System.in);
        String arr[]={"abc","def","ghi","jkl" ,"mno","pqrs","tuv","wx","yz"};
        String s=sc.next();
        ArrayList<String> list=keypad(s,arr);
        for(String val:list)
        {
            System.out.print(val);
        }
		System.out.println();
        System.out.println(list.size());
    }
	public static ArrayList<String> keypad(String s,String[] arr)
    {   if(s.length()==0)
        {
            ArrayList<String> base=new ArrayList<>();
            base.add(" ");
            return base;
        }
        char ch=s.charAt(0);
        String ros=s.substring(1);
        ArrayList<String> rr=keypad(ros,arr);
        ArrayList<String> myans=new ArrayList<>();
        int n=Integer.parseInt(String.valueOf(ch));
        String key=arr[n-1];
        for(int i=0;i<key.length();i++)
        {
            for(String val:rr)
            {
                myans.add(key.substring(i,i+1)+val);
            }
        }return myans;
    }
}

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.