Trying to write a interface for a vector class i have to implement,getting some errors tho,and dont know what i´m doing wrong.
Hope some1 can point me in the right direction!
the error i´m getting is "T cannot be resolved to a type"
public interface IVector <T>
void add(T elem);
void add(T elem, int pos);
boolean contains(Object elem);
int indexOf(T elem);
boolean remove(int pos);
boolean remove(Object elem);
T elementAt(int pos);
void insertElemenAt(T elem, int pos);
void setElementAt(T elem, int pos);
Which line is causing that error? It compiles fine for me. Are you using Java 1.5 or later?
It complained about every line with T in it.
Restarted the IDE,and now i get no errors,weird bug;( wasted like 2 hours googling the interweb for a answer tho:(
Sorry for a uneccesary post.