0
Well, you can simply find out where the * can be, e.g.:
___, __*, _**, _*_, **_, ***,*__
and then replace:
fin, fi*, f**, f*n, **n, ***,*in
Code:
public static String[] possibleCombinations(String s) {
int length = s.length();
char[][] strings = new char[length * (length + 1) / 2][...