Page 2 of 2 FirstFirst 12
Results 21 to 23 of 23
  1. #21
    VinTiger is offline Member
    Join Date
    Feb 2009
    Rep Power


    thanks everyone for all the help by the way. I find it a lot easier to understand this stuff learning from others than from books that overlook big parts of the learning process, and doesn't teach you much of the crucial basics.

  2. #22
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power


    I'm hoping and praying that you'll learn to love and get benefit from the books too. In the end, they will prove much more efficient and less frustrating at helping you learn. Best of luck.

  3. #23
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    New Zealand
    Rep Power


    can I choose column 2 for instance within the brackets, such as [c1] or something like that?
    Yes - you can say phone[r][0]=... to put a name in the first column (column zero) and phone[r][1]=... to put a phone number in the second column.

    The name/number are now associated in the sense that they are both in row r.

    (I think that's what you were asking)

    Shouldn't the names and the numbers be stored in different columns in the program?
    Yes they should be. (But this doesn't mean that you have to populate the array with nested loops. You can, but you don't have to.

    Using phones[r][0]=... / phones[r][1]=... you can use a single for loop (which makes r run over the correct values) and within that loop set both column values.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 7
    Last Post: 09-26-2011, 11:29 PM
  2. two-dimensional array
    By kHim in forum New To Java
    Replies: 4
    Last Post: 11-16-2008, 08:21 PM
  3. Multi dimensional Array
    By Preethi in forum New To Java
    Replies: 1
    Last Post: 07-09-2008, 03:34 PM
  4. Replies: 2
    Last Post: 01-07-2008, 08:45 PM
  5. Help with array multi-dimensional
    By barney in forum New To Java
    Replies: 1
    Last Post: 07-31-2007, 08:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts