Getting one wrong answer

public static void main(String[] args) {

Scanner scn=new Scanner(System.in);
int n=scn.nextInt();
for(int i=1;i<=n;i++) {
	for(int j=1;j<=2*(n-1);j++) {
		if(j<=n+1-i) {
			System.out.print(j+" ");
		}else if(j>n+1-i && j<=n+i-2) {
			System.out.print("* ");
		}else {
			System.out.print("  ");
		}
	}
	System.out.println();
}
}

/////////////////////////////
can u please tell me why I am getting wrong answer in one test case

@ubaidshaikh9999,
If the input is 1. The output will be 1. Your code is printing nothing

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.