Hello, I was looking at
Java System classes sources and I got some dudes about Interfaces:
Look at the following class declarations:
1)public class LinkedList extends AbstractSequentialList
implements List, Cloneable, java.io.Serializable {...}
2)public abstract class AbstractSequentialList extends AbstractList {...}
and
3)public abstract class AbstractList extends AbstractCollection implements List {}
My question is: Why is it necessary to put "implements List" in LinkedList declaration?
LinkedList is a subclass of AbstractList
( AbstractList --> AbstractSequentialList ---> LinkedList ) AbstractList already declares it implements List interface, so I think LinkedList does not need to declare it explicitly. Am I right?.
BTW , I am taking the
SCJP Test in 3 days...I am very nervous!!!
Thanks and sorry about my English!
My question is: Why is it necesary to put "implements List" in LinkedList declaration?
LinkedList is a subclass of AbstractList
( AbstractList --> AbstractSequentialList ---> LinkedList ) AbstractList already declares it implements List interface, so I think LinkedList does not need to declare it explicitly. Am I right?.
BTW , I am taking the SCJP Test in 3 days...I am very nervious!!!
Thanks and sorry about my english!