How can I filter an array in Java?
I have an array of objects, for example cars:
Class:
public class Car{ public int doors; public Ca
I can't see much wrong with your code. You could just stick with Vectors throughout though.
You could simplify the second part (where you copy the matching items into the new array) using Vector.copyInto(Object[]).