- All Superinterfaces:
- Iterator<E>
- See Also:
- Top Examples, Source Code,
previous()
, next()
, set(Object)
, remove()
, Collection
,
List
,
Enumeration
void add(E o)
- See Also:
- IllegalArgumentException, ClassCastException, UnsupportedOperationException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void add(Object o)
- See Also:
- IllegalArgumentException, ClassCastException, UnsupportedOperationException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
boolean hasNext()
- See Also:
- E, Iterator
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
boolean hasPrevious()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[1957]ListIterator
By rajesh on 2008/02/25 20:19:58 Rate
public class iterator {
public static void main ( String args [ ] )
{
List list=new ArrayList ( ) ;
list.add ( 'a' ) ;
list.add ( 'b' ) ;
list.add ( 'c' ) ;
list.add ( 'd' ) ;
list.add ( 'e' ) ;
Iterator itr=list.iterator ( ) ;
while ( itr.hasNext ( ) )
{
System.out.println ( "the element in the iterator is :"+itr.next ( ) ) ;
}
System.out.println ( "the element in reverse order is" ) ;
ListIterator listitr=list.listIterator ( ) ;
while ( listitr.hasNext ( ) )
{
System.out.println ( "the elemet is :"+listitr.previous ( ) ) ;
}
}
}
E next()
- See Also:
- NoSuchElementException, Iterator
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
int nextIndex()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
E previous()
- See Also:
- NoSuchElementException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
int previousIndex()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
void remove()
- See Also:
- IllegalStateException, UnsupportedOperationException, E, Iterator
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
void set(E o)
- See Also:
- IllegalStateException, IllegalArgumentException, ClassCastException, UnsupportedOperationException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void set(Object o)
- See Also:
- IllegalStateException, IllegalArgumentException, ClassCastException, UnsupportedOperationException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples