Skip to content

Commit 3421bad

Browse files
authored
Change peek() to poll() to clarify functionality
Typo
1 parent c96230b commit 3421bad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

collections-questions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1553,7 +1553,7 @@ Hbase
15531553
```
15541554
**The poll() method**
15551555

1556-
The peek() method of the Queue interface returns the object at the top of the current queue and removes it. If the queue is empty this method returns null.
1556+
The poll() method of the Queue interface returns the object at the top of the current queue and removes it. If the queue is empty this method returns null.
15571557

15581558
```java
15591559
import java.util.Iterator;

0 commit comments

Comments
 (0)