Search:

Type: Posts; User: Norm

Search: Search took 0.20 seconds.

  1. Replies
    16
    Views
    5,416

    [SOLVED] Re: UNION OF TWO INTEGER ARRAYS... HELP?

    Thanks for the kind words.
    Good luck on the exam.
  2. Replies
    16
    Views
    5,416

    [SOLVED] Re: UNION OF TWO INTEGER ARRAYS... HELP?

    The default value of an element in an int array is zero. If you don't change an element's value, it will be zero. A zero is a valid int array value.
    When copying an array's contents, your logic can...
  3. Replies
    16
    Views
    5,416

    [SOLVED] Re: UNION OF TWO INTEGER ARRAYS... HELP?

    If you are working with arrays and you want to have the final array be exactly the correct length,
    you will need to make two passes over the array that has the entries to be removed:
    One to count...
  4. Replies
    16
    Views
    5,416

    [SOLVED] Re: UNION OF TWO INTEGER ARRAYS... HELP?

    Please explain.
  5. Replies
    16
    Views
    5,416

    [SOLVED] Re: UNION OF TWO INTEGER ARRAYS... HELP?

    It would be better if you used the sum of lengths of the two arrays instead of hardcoding 14.
  6. Replies
    16
    Views
    5,416

    [SOLVED] Re: UNION OF TWO INTEGER ARRAYS... HELP?

    That's strange. When I printed out the combined arrays, I saw bad data.
    Are you certain that the concatenation works?
  7. Replies
    16
    Views
    5,416

    [SOLVED] Re: UNION OF TWO INTEGER ARRAYS... HELP?

    Try debugging your code by printing out the contents of the arrays as you work with them.
    An easy way to do that is the Arrays toString method:

    System.out.println("B unique=" +...
  8. Replies
    16
    Views
    5,416

    [SOLVED] Re: UNION OF TWO INTEGER ARRAYS... HELP?

    Are you saying the output from the program is wrong?
    Can you post here what the output looks like and show us what you want it to look like.
    With comments as necessary to help us understand the...
Results 1 to 8 of 8