How to get sub list from vector?

source url annonce rencontre femme marrakech How to get sub list from vector?

follow site The method subList() helps us to get sub range from the given vector object.

follow site site de rencontre conseil subList(int fromIndex, int toIndex)

femme asiatique rencontre homme pour mariage Returns a view of the portion of this List between fromIndex, inclusive, and toIndex, exclusive.

go to site package vector; import java.util.List; import java.util.Vector; public class VectorSublistExample { public static void main(String[] args) { Vector<String> vct = new Vector<String>(); //adding elements to the end vct.add("India"); vct.add("Autralia"); vct.add("New Zealand"); vct.add("England"); vct.add("New Delhi"); System.out.println("Actual vector:"+vct); List<String> list = vct.subList(2, 4); System.out.println("Sub List: "+list); } } site de rencontres pour personnes de 50 ans Output: Actual vector:[India, Autralia, New Zealand, England, New Delhi]
Sub List: [New Zealand, England]