📅  最后修改于: 2022-03-11 14:52:11.038000             🧑  作者: Mango
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 .