I created an interface:
public interface Random<E>{
// methods signatures
}
I know it is unusual to do so but I need to make a class extending the ArrayList class and implements this interface, so I write some code likes this:
public class RandomTest<E> implements Random<E> extends ArrayList<E>{
// a lot of code
// overriding methods
public static void main(String[] args){
RandomTest<Integer> list = new RandomTest<Integer>();
}
But it can't compile. Just keep showing -
"Syntax error on token "extends", , expected."
I am confused.