The key to your solution is using the pad array declared in the code below.
In a partial phone number 763, for example,
pad[7] will yield the array {'p','q','r'},
pad[6] will yield the array {'m','n','o'},
pad[3] will yield the array {'a','b','c'},
Then, use recursive method getAlpha(int[] num, int next, char[]alpha) to iterate over every combination possibility, forming an algorithmic tree of alphabetic progressions. At each leaf/end node of the tree, is a completed array of alphabets to be appended to the list. Using only one array of alphabets to be reused/overwritten when it recurse back to a previous digit position is possible because the stringified alphabet array is appended only when a leaf/end node is reached. stringify(char[]) not included here.
getAlpha(int[] num) is the entry point method to start from digit position 0 of the recursion. Each recursion level processes the next digit of the phone number.
public class Z{
// 2D array [i][j]
// use phone digit as array index i
final char[][] pad = {
{'0'},
{'1'},
{'a','b','c'},
{'d','e','f'},
{'g','h','i'},
{'j','k','l'},
{'m','n','o'},
{'p','q','r'},
{'s','t','u','v'},
{'w','x','y','z'},
};
// This will be the horrendously long list of possible alphabetic codes
List<String> combinations = new ArrayList<String>();
void getAlpha(int[] num, int next, char[]alpha){
// iterate over all possible alphabets of next digit
for (int i=0; i<pad[next].length; i++){
//set,overwrite next cell of array with iterated alphabet
alpha[next] = pad[next][i];
if (i<num.length-1)
//process next next digit
getAlpha(num, next++, alpha);
else
//if end of number
//append array to horrendously long list
combinations.add(stringify(alpha));
}
}
public void getAlpha(int[] num){
getAlpha(num, 0, new char[num.length]);
}
}