在线
客服

发布
需求

在线
聊天

天盟
APP

天盟APP下载

关注
微信

微信扫一扫访问
顶部

随机生成二维数组,乱码了,求大神指点!!

public static void main(String[] args) {
                Demo05  hellDemo05 = new Demo05();
                 int[][]  nums = hellDemo05.getArray(4, 5);
                System.out.println(Arrays.toString(nums));
        }
        public int[][]  getArray(int lengthA,int lengthB){
                int[][] nums =  new  int[lengthA][lengthB];
                //for循环遍历数组

                for (int i = 0; i

免责声明:本内容仅代表回答会员见解不代表天盟观点,请谨慎对待。

版权声明:作者保留权利,不代表天盟立场。

使用道具 举报

全部参与1

那不是乱码,那是内存地址,在java中,二维数组可以看成是类型为数组的一组数组,即看成一个对象,所以返回的是内存地址,只是这个对象他代表是的数组

使用道具 举报

发新帖
国内首家创新型IT技术需求众包服务平台,软件需求就上天盟网! 立即登录 立即注册