Site Search:

OCPJP Simulation Test 82

<Back to OCPJP





Question: What are the following code compiles?

Choice:
A. List<? extends InputStreamReader> list = new LinkedList<FileReader>();
B. Collection<? super BufferedOutputStream> c = new Deque<OutputStream>();
C. Set<? extends FilterOutputStream> s = new TreeSet<BufferedOutputStream>();
D. Queue<?> queue = new PriorityQueue<Object>();
E. Queue<? super PrintWriter> queue = new LinkedBlockingQueue<Writer>();
F. Map<? extends OutputStreamWriter, ? super PrintStream> map = new HashMap<PrintWriter, FilterOutputStream>();
G. ConcurrentMap<? extends InputStreamReader, ? super OutputStreamWriter> c = new ConcurrentHashMap<FileReader, Writer>();
H. List<? extends InputStream> list = new CopyOnWriteArrayList<FileInputStream>();