-
2006-06-30
Java array - [工作学习]
版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
Java two dimension array define: array[rows][cols]; String[][] array=new String[rows][cols]; array.length=rows; array.length[0].length=cols; Which style is perfect? int[] array int array[] Suggest the first that can point the int[] is a type. The second one is style of C although java supported. How to init array? int[] array={1,23,2}; int[] array=new int[3]; int[] array=new int[]{1,2,3}; int[][][] arrMatrix=new int[3][4][5]; arrMatrix[2][3][4]=234; multi-dimension array:high dimension is array of low dimension. int[4][3] : express a two dimension array,row=4,col=3 It equals to the following code. int[4] = {int[3],int[3],int[3],int[3]}; initialization of multi-dimension array: int[][] a={{1,2,3},{0,0,0}}; //2 rows,3 cols
http://jimsu.yourblog.org/logs/568630.html
随机文章:
DDD开发 2007-09-03web开发的痛苦与总结 2007-07-22RTSP协议:网上看电影 2006-01-26redhat在嵌入式平台上的应用 2006-01-20vmware linux gdb tips 2005-07-19
收藏到:Del.icio.us





