Driver program to test above functions
public static void main ( String [ ] args ) { int m = 4 , n = 4 ; int a [ ] [ ] = new int [ MAX ] [ MAX ] ; spiralFill ( m , n , a ) ; for ( int i = 0 ; i < m ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { System . out . print ( a [ i ] [ j ] + " ▁ " ) ; } System . out . println ( " " ) ; } } }