您好,欢迎访问三七文档
当前位置:首页 > 电子/通信 > 综合/其它 > 《Java语言程序设计:基础篇》课后复习题答案-第七章
Chapter7MultidimensionalArrays1int[][]m=newint[4][5];2Yes.Theyareraggedarray.3array[0][1]is2.4.int[][]r=newint[2];Answer:Invalidint[]x=newint[];Answer:Invalidint[][]y=newint[3][];Answer:Valid5.Whydoestheis1To9methodneedtocopylisttotemp?Becauseweneedtosortlist.Sortinglistwillchangethecontentsoflist.Thiswillchangethecontentsofgridafterinvokingis1To9(grid[i]).Whathappensifyoureplacethecodeinlines66-70inListing7.4withthefollowingcode:java.util.Arrays.sort(list);Thecontentsingridarechanged.Consequently,youcannotcheckcolumnsandsmallboxesusingthealteredgrid.6.int[][][]m=newint[4][6][5];
本文标题:《Java语言程序设计:基础篇》课后复习题答案-第七章
链接地址:https://www.777doc.com/doc-4270596 .html