Java ArrayBlockingQueue Spliterator() Method

The Spliterator() method of Java ArrayBlockingQueue class returns a Spliterator over the elements in this ArrayBlockingQueue.

Syntax:

Parameters:

NA

Specified By:

The Spliterator () method of ArrayBlockingQueue class is specified by:

  • Spliterator in interface Collection<E>.
  • Spliterator in interface Iterable<E>

Return Value:

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

Example 1

Output:

1 Name - Reema
2 Name - Varun
3 Name - Sukla

Example 2

Output:

1 Roll No = 15cs1029
 Name = Reema panda
 Marks = 21

2 Roll No = 15cs1012
 Name = Geetanjali Sharma
 Marks = 26

3 Roll No = 15cs1011
 Name = Himanshu Bhardwaj
 Marks = 27

Example 3

Output:

1 Lower case = reema
1 Upper case = REEMA

2 Lower case = bhavika
2 Upper case = BHAVIKA

3 Lower case = chehak
3 Upper case = CHEHAK

4 Lower case = chandan
4 Upper case = CHANDAN