Denys_newbie
Denys_newbie

Reputation: 1160

What is int[] arr[] mean in Java?

I know that I can declare array that ways:

int[] arr1;      // one-dimensional array                                                                                     
int arr2[];      // one-dimensional array (declared using C-style)            
int[][] arr3;    // two-dimensional array    
int arr4[][];    // two-dimensional array (declared using C-style)            
int[] arr5[];    // - ? (possibly two-dimensional array)                                                                   
int[][] arr6[];  // - ? (possibly three-dimensional array)                                     
int[] arr7[][];  // - ? (possibly three-dimensional array)        

Upvotes: 1

Views: 501

Answers (1)

Andrew
Andrew

Reputation: 2665

int[] arr[] is the c-style of declaration and is equivalent to int[][] arr;

Upvotes: 2

Related Questions