🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.lang.java
Article #12214

Re: ����һ��JAVA����

#12214
From: ��������
Date: Wed, 04 Aug 2004 01:35
47 lines
2371 bytes
����Ӧ���������:
public class Array2D
{
    public static void main(String[] args)
    {
        int i;
        int [][] twoD=new int[4][];
        int [] array1 ={1,2,3,4};
        int [] array2 ={1,2,3,4,5};
        int [] array3 ={1,2,3,4,5,6};
        int [] array4 ={1,2,3,4,5,6,7};

        twoD[0] = array1;
        twoD[1] = array2;
        twoD[2] = array3;
        twoD[3] = array4;

        for(i=0;i<4;i++)
        {
	        for(int j=0;j<twoD[i].length;j++)
	        System.out.print(twoD[i][j]);
	        System.out.println();
	                
        }

    }
}
------------------------------------------------------------------------
��Ĵ�������Ϊ�㻹û�а�java�еľ���ջ�ڴ�Ͷ��ڴ�ѧ��,�úÿ���ȥ��!
        twoD[0] = array1;
        twoD[1] = array2;
        twoD[2] = array3;
        twoD[3] = array4;
����ϱߵ�������,twoD[0]={1,2,3,4};(�����Ҳ��һ���),
��
twoD[0]��,������ָ���˺��������׵�ַ,��Ϊ�����������[I@1858610.
�����ڴ�ĵ�ַ,����Ͳ�Ҫ������.������������twoD[0]={1,2,3,4}���(��ʡ����
���twoD[1],twoD[2],twoD[3]),����Ӧ����:
for(int i=0,i<=3,i++)
{
    System.out.println("two[0]["+i+"="+two[0][i]);
}
------------------------------------------------------------------------
����2ά����,���������Ϊ�����һά�������ϰ�!
--

�� ��Դ:���Ұ��Ͽ�վ nkbbs.org ��Web[FROM: 202.113.183.17]
Technical Details
Message-ID: <4DUHN4$9yT@bbs.nankai.edu.cn>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!ngpeer.news.aol.com!feed2.newsreader.com!newsreader.com!maily.cic.tsinghua.edu.cn!news2.happynet.org!NanKai

Show Full Headers
Complete Article Headers
X-Google-Thread: f6cb0,15725eeb9cb12e37
X-Google-Attributes: gidf6cb0,public
X-Google-Language: ENGLISH,ASCII
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!ngpeer.news.aol.com!feed2.newsreader.com!newsreader.com!maily.cic.tsinghua.edu.cn!news2.happynet.org!NanKai
From: liutjedu.bbs@bbs.nankai.edu.cn (��������)
Newsgroups: cn.bbs.comp.lang.java
Subject: Re: ����һ��JAVA����
Date: 04 Aug 2004 01:35:16 GMT
Organization: �Ұ��Ͽ�վ
Message-ID: <4DUHN4$9yT@bbs.nankai.edu.cn>
X-Filename: Java/M.1091583316.A