About Question com.enthuware.ets.scjp.v6.2.82 :
Posted: Fri Oct 10, 2014 6:14 am
LinkedList container = new LinkedList();
"This is not valid because event though LinkedList has add() method, it does not have poll() method, which is used in the code."
--------------------------------------------
According to docs, LinkedList does have a poll() method.
http://docs.oracle.com/javase/1.5.0/doc ... dList.html
Not that I understand what it's for, since it seems to duplicate remove().
"This is not valid because event though LinkedList has add() method, it does not have poll() method, which is used in the code."
--------------------------------------------
According to docs, LinkedList does have a poll() method.
http://docs.oracle.com/javase/1.5.0/doc ... dList.html
Not that I understand what it's for, since it seems to duplicate remove().