Search:

Type: Posts; User: aussiemcgr

Search: Search took 0.08 seconds.

  1. Replies
    15
    Views
    3,419

    Re: ADT list help

    It will always return true for what you have.


    This may be (and I'm not positive) because it has not been specified what is in the Vector. In order to do that, instead of:

    public boolean...
  2. Replies
    15
    Views
    3,419

    Re: ADT list help

    Ok, well if the list or array will be guaranteed big enough, we may not need to resize the array. If you run into an indexOutOfBounds exception, then that will be an indication that the array needed...
  3. Replies
    15
    Views
    3,419

    Re: ADT list help

    Ok, well Vectors are very simple.

    I'm sure you are not allowed to, but Vectors actually support this feature already. The method: Vector.copyInto(Object[] anArray) is provided by the Vector class....
  4. Replies
    15
    Views
    3,419

    Re: ADT list help

    Seems good. There are a few stylistic things I would change:

    First off, there is no real reason to loop through twice. You can actually loop once and just check each value each time. We can...
  5. Replies
    15
    Views
    3,419

    Re: ADT list help

    Ok, first off, an array is very vague. Is it an array in the sense of: Object[] or an array in the sense of a Collection<E>? Knowing that will tell us how to go about swapping.

    I would assume...
Results 1 to 5 of 5