Home » Java List spliterator() Method with Examples

Java List spliterator() Method with Examples

by Online Tutorials Library

Java List spliterator() Method

The spliterator() method of List Interface creates a Spliterator over the elements in the given list.

Syntax

Parameters

NA

Specified by

  • spliterator() in interface Collection<E>
  • spliterator() in interface Iterable<E>

Returns:

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

Example 1

Test it Now

Output:

Values : 1 2 3 4 5 6 7 8 9 10  

Example 2

Test it Now

Output:

Name : Reema     School : Gita Convent School     Course : Java   Name : Geetu     School : Gita Convent School     Course : Android   Name : Saloni     School : Eicher Public School     Course : Java  

Example 3

Test it Now

Output:

Values :   12345678910  
Next TopicJava List

You may also like