Skip to Main Content
Java
book

Java

by Michael Sikora
January 2003
Beginner to intermediate content levelBeginner to intermediate
150 pages
7h 28m
English
Morgan Kaufmann
Content preview from Java
1 52
Chapter 9: Collections II
The subList(startposition, endposition) method is used to create a sublist from the
current list starting at startposition inclusive to endposition exclusive. For example, the
statement
List cl = c. subList(2, 4) ;
creates a sublist cl with contents "Smith", "Brown".
The List interface also provides its own iterator, ListIterator, in addition to the
Collection interface iterator. ListIterator inherits all the methods of Iterator but in ad-
dition provides methods such as previous and hasPrevious for iterating through a list in the
reverse direction, previous returns the previous element in ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JAVA Programming

JAVA Programming

K. Rajkumar
Java Programming

Java Programming

Poornachandra Sarang
Java Programming

Java Programming

Hari Mohan Pandey
Java 9 for Programmers

Java 9 for Programmers

Paul J. Deitel, Harvey Deitel

Publisher Resources

ISBN: 9781558609099