Question: Given Deque<? super FilterOutputStream> deque = new ArrayDeque<OutputStream>(), what are the following code compiles?
Choice:
A. deque.add(new Object());
B. deque.add(new OutputStream());
C. deque.add(new FilterOutputStream());
D. deque.add(new BufferedOutputStream());
E. deque.add(new ObjectInputStream());
F. deque.add(new PrintStream());
G. deque.add(new ObjectOutputStream());
H. deque.add(new printWriter());
Explain: regardless of the right side assignment, only the left side type declaration counts: Deque<? super FilterOutputStream> queue You can only add the subclass of FilterOutputStream to the queue. Of course you need to be familiar with NIO classes.