Problem spiral clockwise

import java.util.;
class Main{
public static void main(String args[]){
// Scanner cin = new Scanner(System.in);
// int m = cin.nextInt(), n = cin.nextInt();
int ar[][] = {{11,22,33,44},{21,22,23,24},{31,32,33,34},{41,42,43,44}};
int left = 0, top = 0, right = ar[top].length-1, bottom = ar.length -1, dir = 1, count = (bottom + 1)
(right + 1);
while(top<=bottom && left<=right){
if(count>0){
if(dir == 1){
for(int i = left;i<=right;i++){
System.out.print(ar[top][i]+ ", ");
count–;
}
top ++;
dir = 2;
}
}
if(count>0){
if(dir == 2){
for(int i = top;i<= bottom;i++){
System.out.print(ar[i][right]+ ", ");
count–;
}
right --;
dir = 3 ;
}
}
if(count>0){
if(dir == 3){
for(int i = right;i>=left;i–){
System.out.print(ar[bottom][i]+ ", ");
count–;
}
bottom --;
dir = 4 ;
}
}
if(count>0){
if(dir == 4){
for(int i = bottom;i>=top;i–){
System.out.print(ar[i][left]+ ", ");
count–;
}
left++;
dir = 1 ;
}
}
}
System.out.print(“END”);
}
}===what’s the error in code