Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2013
    Posts
    1
    Rep Power
    0

    Question Parallel Array help

    I need help with a problem with using arrays.

    Say i have an char array with {a,b,c,d} and an int array with {7,9,4,6}

    I need to enter "b" and receive "9".

    I am racking my brain and cannot do it for the life of me. Unfortunately, i have to keep the values in two separate arrays.

    In a more complex way to explain it, i need to give firstArray[i] and recieve secondArray[i], where i is the array cell in which corresponding information is.

    Any help would be so appreciated.

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    United States
    Posts
    3,389
    Rep Power
    5

    Default Re: Parallel Array help

    Do you know how to iterate through an array of letters? Say you choose letter, 'b'. If letter 'b' is at index 3, what value of the integers are you going to return?

    Regards,
    Jim
    The Java™ Tutorial | SSCCE | Java Naming Conventions
    Poor planning our your part does not constitute an emergency on my part.

Similar Threads

  1. parallel arrays
    By belfast09 in forum New To Java
    Replies: 6
    Last Post: 06-13-2011, 11:48 AM
  2. Parallel Array Lists?
    By Solarsonic in forum New To Java
    Replies: 24
    Last Post: 05-18-2011, 05:18 AM
  3. how to run parallel processes ?
    By mapred.learn in forum New To Java
    Replies: 2
    Last Post: 03-02-2011, 12:45 AM
  4. Parallel Arrays
    By mwenchong in forum New To Java
    Replies: 7
    Last Post: 11-17-2010, 12:20 AM
  5. two parallel arrays
    By Adomini in forum New To Java
    Replies: 12
    Last Post: 09-07-2010, 01:45 AM

Posting Permissions

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