Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

difference between offer and add in linkedlist in java

2 Answers. The difference is that offer() will return false if it fails to insert the element on a size restricted Queue, whereas add() will throw an IllegalStateException .
 
PREVIOUS NEXT
Tagged: #difference #offer #add #linkedlist #java
ADD COMMENT
Topic
Name
3+5 =