Site Search:

OCPJP Simulation Test 74

<Back to OCPJP





Question: Given Queue<? super OutputStream> queue = new ArrayBlockingQueue<OutputStream>(10), what are the following code compiles?

Choice:
A. queue.add(new OutputStream());
B. queue.add(new FileOutputStream());
C. queue.add(new FileWriter());
D. queue.add(new BufferedOutputStream());
E. queue.add(new ObjectsOutputStream());
F. queue.add(new BufferedWriter());
G. queue.add(new FilterInputStream());
H. queue.add(new PrintOutputStream());