Which of the following array creations are valid?

int[] x=new int[]; Invalid
int[] x=new int[3]; Valid
int[][] x=new int[][]; Invalid
int[][] x=new int[3][]; Valid
int[][] x=new int[][4]; Invalid
int[][] x=new int[3][4]; Valid
int[][][] x=new int[3][4][5];    Valid
int[][][] x=new int[3][4][]; Valid
int[][][] x=new int[3][][5]; Invalid
int[][][] x=new int[][4][5]; Invalid

0 comments: