java.util
Class ArrayList
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.ArrayList
All Implemented Interfaces:
Cloneable, Collection, List, RandomAccess, Serializable 明明是各类呀
Class ArrayList
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.ArrayList
All Implemented Interfaces:
Cloneable, Collection, List, RandomAccess, Serializable 明明是各类呀
ListIterator listIterator(); /**
* Returns a list iterator of the elements in this list (in proper
* sequence), starting at the specified position in this list. The
* specified index indicates the first element that would be returned by
* an initial call to the <tt>next</tt> method. An initial call to
* the <tt>previous</tt> method would return the element with the
* specified index minus one.
*
* @param index index of first element to be returned from the
* list iterator (by a call to the <tt>next</tt> method).
* @return a list iterator of the elements in this list (in proper
* sequence), starting at the specified position in this list.
* @throws IndexOutOfBoundsException if the index is out of range (index
* < 0 || index > size()).
*/
这个就是你说的那个方法。源码,因为是接口,其实没有任何代码!
ArrayList是类。
iterator返回的实现了ListIterator的一个接口。
你还是去搞清楚extends,implements,上溯造型to xiongyi3521(xiongying)
瞎扯,他现在基本概念都不懂,看什么设计模式
class AClass implements AnInterace,说明它已经是一个类了(也许仍然是abstract),而不再世interface了,一个接口的继承应当是
interface AnInterace extends AnotherInterace, NextInterface{
。
}