Multi-dimensional Array in Java?

Discussion in 'Java' started by kk_oop, Jul 24, 2004.

  1. kk_oop

    kk_oop Guest

    Hi. I tried to post this once, but something went wrong in my browser. I apologize if this is a duplicate post.

    I need to store a series of numbers in a two-dimensional lookup table. Basically, it'll be preset to static final values and
    accessed by two indicies. Any standard Java approach for this? I'd like to use an ArrayList over an array for bounds safety
    reasons. Is that the way to go, or is there a better approach?

    I'm new to Java, and I know it has a huge API, so I'm just looking for pointers--or I guess I should say references. Heh heh.

    Thanks,

    Ken
     
    kk_oop, Jul 24, 2004
    #1
    1. Advertising

  2. kk_oop

    Liz Guest

    "kk_oop<no spam> @yahoo.com>" <"kk_oop<no spam> wrote in message
    news:4102901e$0$5625$...
    > Hi. I tried to post this once, but something went wrong in my browser. I

    apologize if this is a duplicate post.
    >
    > I need to store a series of numbers in a two-dimensional lookup table.

    Basically, it'll be preset to static final values and
    > accessed by two indicies. Any standard Java approach for this? I'd like

    to use an ArrayList over an array for bounds safety
    > reasons. Is that the way to go, or is there a better approach?
    >
    > I'm new to Java, and I know it has a huge API, so I'm just looking for

    pointers--or I guess I should say references. Heh heh.
    >
    > Thanks,
    >
    > Ken


    I use this and java checks the bounds for me automatically.

    final static String[][] COPTIONS =
    { { "Stop", "b000"+BBLUE1+","+BBLACK }, {
    "Pause", "c000"+BBLUE1+","+BBLACK }, {
    "Step Forward", "r001"+BBLUE1+","+BBLACK }, {
    and so on...... }}
     
    Liz, Jul 25, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    7
    Views:
    855
    Ryan Stewart
    Feb 20, 2005
  2. John Harrison
    Replies:
    2
    Views:
    722
    John Harrison
    Jul 14, 2003
  3. Samuele Armondi
    Replies:
    0
    Views:
    376
    Samuele Armondi
    Jul 13, 2003
  4. Venkat
    Replies:
    4
    Views:
    1,007
    Venkat
    Dec 5, 2003
  5. Wirianto Djunaidi
    Replies:
    2
    Views:
    222
    Wirianto Djunaidi
    Apr 29, 2008
Loading...

Share This Page