Why drainTo is not present in regular collection framework?

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
The_Nick
Posts: 132
Joined: Thu May 16, 2013 9:23 am
Contact:

Why drainTo is not present in regular collection framework?

Post by The_Nick »

I was wondering why the method drainTo http://docs.oracle.com/javase/7/docs/ap ... ,%20int%29 of the BlockingQueue interface is not present in the Queue or any other interface belonging to the non-concurrent colletion framework.
Since one of the topic of concurrency for the exam is :
Use collections from the java.util.concurrent package with a focus on the advantages over and differences from the traditional java.util collections.
I am kindly asking why.


Thanks in advance.

The_Nick.

admin
Site Admin
Posts: 10067
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: Why drainTo is not present in regular collection framework?

Post by admin »

Not really sure why. Oracle can answer that better :)
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 225 guests