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...
Type: Posts; User: aussiemcgr
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...
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...
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....
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...
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...