Mirror Star Pattern (Pattern 5)

import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int star=1;
int space=n-1;
int row=1;
while(row<=n){
int k=1;
while(k<=space){
System.out.print("\t");
k++;
}

		int j=1;
		while(j<=star){
			System.out.print("*\t");
			j++;
		}
		if(row<=n/2){
			star+=2;
			space--;
		}
		else{
			star-=2;
			space++;
		}
		System.out.println();
		row++;
	}
}

}

I am not sure why my code is not getting accepted?