question about interfaces
hey all
i have an interface called Sortable and i have a method in another class that class that takes as parameter an array of Sortable (e.g. methodName(Sortable[]))... i need to make this method to take instead of an array of Sortable a Vector of Sortable... but i dunno the right syntax...how should the parameter be written....
please help
thanks in advance
[386 byte] By [
fouadka] at [2007-11-26 22:48:31]

> thanks all for your suggestions but im obliged to use vectors...
You may be coerced into using Vectors for your List implementations, but you can still
do the right thing when writing a method:
import java.util.*;
interface Sortable {}
public class VectorExample implements Sortable {
public void whatever(List<? extends Sortable> x) {}
public void f() {
whatever(new Vector < VectorExample > () );
}
}