java – Pascal's Formula Recusrion (no triangle)

I therefore try to reoffend through Pascal's formula that is (n-1, k-1) + (n-1, k) but I have trouble going through both sides. I think of this as a trace of box .. here is what I have until now. I know my basic cases are correct but my actual recurse method is incorrect

static void printSubsets (int []B, int k, int i) {
// int n = 0;

if (k == 0) {
System.out.println (setToString (B));
}

if (k> B.length - i) {
return ;
}

otherwise if (B[i]! =) {
printSubets (B, k, i + 1);

}

otherwise if (B[i]== 1) {
printSubets (B, k-1, i + 1) ;;
}

}