Site Search:

OCPJP Simulation Test 83

<Back to OCPJP





Question: What are the following code compiles?

Choice:
A. Collection<? extends Writer> c = new CopyOnWriteArraySet<PrintWriter>();
B. Set<? super PrintStream> set = new LinkedHashSet<InputStream>();
C. List<? extends ObjectOutputStream> s = new CopyOnWriteArrayList<FilterOutputStream>();
D. Queue<? extends OutputStream> queue = new SynchronousQueue<PrintStream>();
E. Queue<? super PrintWriter> deque = new ArrayDeque<Writer>();
F. Map<? extends Reader, ? super ObjectOutputStream> map = new TreeMap<BufferedReader, OutputStream>();
G. Map<? extends Reader, ? super OutputStream> c = new ConcurrentHashMap<InputStreamReader, Writer>();