[6506] in java-interest

home help back first fref pref prev next nref lref last post

Re: Multidimensional Arrays

daemon@ATHENA.MIT.EDU (Robson C. Cozendey)
Mon Apr 1 21:13:22 1996

Date:         Mon, 1 Apr 1996 11:40:19 -0300
Reply-To: Java Interest <JAVA-INTEREST@JAVASOFT.COM>
From: "Robson C. Cozendey" <robson@UENF.BR>
To: Multiple recipients of list JAVA-INTEREST
              <JAVA-INTEREST@JAVASOFT.COM>
In-Reply-To:  <315C4D7C.50B9@postoffice.ptd.net> from "Lou Fasulo" at Mar 29,
              96 03:52:12 pm

>
> I am writing a program where I need a multidimensional array.  I
> realize that Java does not support this but you can simulate it with
> the:
>                 type varname[][]
>
>         However, when I try to declare and initialize it I get a
> statement expected error.
>
>         I would like to create a loop that initializes an 8x8 matrix
> with different values for each "location"  How can I do this??
>
>         You can reply directly to me at:
>                 fasulol@postoffice.ptd.net
>
>                 Thanks
>
> -----
> This message has been forwarded via the JAVA-INTEREST
> mailing list.  In order to unsubscribe from this list, send a message to
> listserv@javasoft.com with the command 'signoff JAVA-INTEREST' in
> the message body (not in the subject line).
>

You can declare that like it:
        type [][] varname;
...and instantiate that like it:
        varname = new type[8][8];

Bye,
        Robson

home help back first fref pref prev next nref lref last post