Vector.subList() Method in Java – Java Example Programs

vector in java

Hello, Welcome to the practice house.in this post we will learn about vector.subList() Method in Java.

First of all let’s know about vector in a simple sentence that vector implements dynamic array .

So in vector we have a method called subList().
This method takes two parameters.
1.First Parameter is for Starting index
2.Second one is for ending point element.

Down there I illustrate in an image I hope that will help you understand clearly.

Example 1 :

Sample Output:

I hope this image will help you to understand clearly about vector.subList() method functionality.

Java Vector Sublist Method

Example 2:

 

Sample Output 2:

Thank you so much for reading this post. if you like our post please appreciate our hard work and if you have any comment or question or suggestion please comments below.

Please share this knowledge with your friend.

Leave a Reply

Your email address will not be published. Required fields are marked *