Incorrect Pattern Code

I am trying to get the below pattern:


**
*

Instead I am getting this pattern:


My code is as below:

public static void patt5(int n){
int row = 1;
int nst = n;
int nsp = 0;
// row work
while(row <= n){
// space work
int asp = 1;
while(asp <= nsp){
System.out.print(" “);
asp++;
}
// star work
int ast = 1;
while(ast <= nst){
System.out.print(”* ");
ast++;
}
// prep
System.out.println();
nst -= 1;
nsp += 1;
row += 1;
}
}

Please suggest what is wrong with the code.

hey @a08mitra
logic is fine :
just a changes :
System.out.print(" “);// one more Tba
correct code :
public static void patt5(int n) {
int row = 1;
int nst = n;
int nsp = 0;
// row work
while (row <= n) {
// space work
int asp = 1;
while (asp <= nsp) {
System.out.print(” “);
asp++;
}
// star work
int ast = 1;
while (ast <= nst) {
System.out.print(”* ");
ast++;
}
// prep
System.out.println();
nst -= 1;
nsp += 1;
row += 1;
}

}

Thanks Sir. It is resolved