Code is not being accepted

This is my code for Ganesha’s Pattern, upon submitting, it shows all three of my test cases has failed but this code works fine.

import java.util.;
public class Main {
public static void main(String args[]) {
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
for(int i=1; i<=n; i++){
if(i==1){
for(int j=1; j<=n; j++){
if(j>=2 && j<(n/2)+1){
System.out.print(" β€œ);
} else {
System.out.print(”
β€œ);
}
}
} else if(i==(n/2)+1){
for(int j=1; j<=n; j++){
System.out.print(”* β€œ);
}
} else if(i==n) {
for(int j=1; j<=n; j++){
if(j>(n/2)+1 && j<n){
System.out.print(” β€œ);
} else {
System.out.print(”* β€œ);
}
}
} else if(i<(n/2)+1){
for(int j=1; j<=(n/2)+1; j++){
if(j==1 || j==(n/2)+1){
System.out.print(”* β€œ);
} else {
System.out.print(” β€œ);
}
}
} else {
for(int j=1; j<(n/2)+1; j++){
System.out.print(” β€œ);
}
for(int j=1; j<=(n/2)+1; j++){
if(j==1 || j==(n/2)+1){
System.out.print(”* β€œ);
} else {
System.out.print(” ");
}
}
}
System.out.println();
}
}
}