Vector class subList(int fromIndex, int toIndex) method example
Returns a view of the portion of this List between fromIndex, inclusive, and toIndex, exclusive.
Vector class subList(int fromIndex, int toIndex) method example. This example shows you how to use subList(int fromIndex, int toIndex) method.This method Returns a view of the portion of this List between fromIndex, inclusive, and toIndex, exclusive.
Here is the code:-
Output of the program:-
New list created between Index 2 & Index 8 of the Vector is:
G
I
R
I
S
H |
|