What’s the error in my code---------
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner cin = new Scanner(System.in);
int m = cin.nextInt(), n = cin.nextInt(), arr[][] = new int[m][n];
for(int i = 0;i<m;i++){
for(int j = 0;j<m;j++){
arr[i][j] = cin.nextInt();
}
}
printSpiral(m,n,arr);
}
public static void printSpiral(int m, int n, int a[][]){
int k = 0, l = 0,i;
while (k < m && l < n) {
for (i = l; i < n; ++i) {
System.out.print(a[k][i] +","+ " “);
}
k++;
for (i = k; i < m; ++i) {
System.out.print(a[i][n - 1] +”,"+ " “);
}
n–;
if (k < m) {
for (i = n - 1; i >= l; --i) {
System.out.print(a[m - 1][i] +”,"+ " “);
}
m–;
}
if (l < n) {
for (i = m - 1; i >= k; --i) {
System.out.print(a[i][l] +”,"+ " ");
}
l++;
}
}
System.out.print(“END”);
}
}