Generics List Interface...newb question

Posted by newToProgramming on Stack Overflow See other posts from Stack Overflow or by newToProgramming
Published on 2010-05-05T03:17:21Z Indexed on 2010/05/05 3:28 UTC
Read the original article Hit count: 221

Filed under:
|

The List interface is the following:

public interface List<E>{
public boolean add(Object e);
public boolean remove(Object e);
public boolean contains(Object e);
...etc

Why aren't the add, remove and contains methods written like the following?

public boolean add(E e)
public boolean remove(E e)
public boolean contains(E e)

© Stack Overflow or respective owner

Related posts about java

Related posts about beginner