add()和offer()区别
1、add():Inserts the specified element at the tail of this queue. As the queue is unbounded, this method will never throw IllegalStateException or return false.
2、offer():Inserts the specified element at the tail of this queue. As the queue is unbounded, this method will never return false.
简单来说就是,当队列长度满时,add会抛出异常,而offer直接返回false;