What's the problem in my code

import java.util.*;
public class Main {
static ArrayList getCodes(String num) {
if (num.length() == 0) {
ArrayList bc = new ArrayList();
bc.add("");
return bc;
}
ArrayList myres = new ArrayList();

	String table[] = { " ", ".+@$", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz" };
	int no1 = Character.getNumericValue(num.charAt(0));
	int no2 = Character.getNumericValue(num.charAt(1));
	String ros = num.substring(2);

	String S1 = table[no1];
	String S2 = table[no2];

	for (int i = 0; i < S1.length(); i++) {
		char ch = S1.charAt(i);
		for (int j = 0; j < S2.length(); j++) {
			String res = "" + ch + S2.charAt(j);
			myres.add(res);
		}
	}
	getCodes(ros);

	return myres;
}

public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	String num = sc.next();
	ArrayList<String> res = getCodes(num);
	for (String s : res) {
		System.out.println(s);
	}
}

}

@nigamshubham1998,
Add type arguments to arraylist.

something like:

			ArrayList<String> bc = new ArrayList<>();

Also, wrong answer for the test case:

Input:
5608
Correct output:
jm t
jm u
jm v
jn t
jn u
jn v
jo t
jo u
jo v
km t
km u
km v
kn t
kn u
kn v
ko t
ko u
ko v
lm t
lm u
lm v
ln t
ln u
ln v
lo t
lo u
lo v

Your output:
jm
jn
jo
km
kn
ko
lm
ln
lo

You are taking only the first 2 numbers of the input string. Hence the wrong answer.

why you’re not replying me

@nigamshubham1998,
I did reply to you

@nigamshubham1998,