Javatpoint Logo
Javatpoint Logo

Java Vector spliterator() Method

The spliterator() method of Java Vector class is used to create a late-binding and fail-fast spliterator over the elements in this list.

Syntax

Following is the declaration of spliterator() method:

Parameter

This method does not accept any parameter.

Return

The spliterator() method returns a spliterator over the elements in the list.

Exceptions

NA

Compatibility Version

Java 1.8 and above

Example 1

Test it Now

Output:

Estimated size: 4
Contents of vector:
10
30
20
40

Example 2

Test it Now

Output:

Estimated size: 5
Contents of vector:
One
Two
Three
Four
Five

Next TopicVector subList()





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA