Site Search:

OCPJP Simulation Test 84

<Back to OCPJP





Question: What are the following code compiles?

Choice:
A. Set<? super PrintWriter> c = new HashSet<OutputStreamWriter>();
B. List<? extends Writer> list = new LinkedList<FileWriter>();
C. List<? super FileOutputStream> s = new CopyOnWriteArrayList<FilterOutputStream>();
D. Queue<? extends FilterOutputStream> queue = new ArrayQueue<BufferedOutputStream>();
E. Queue<? super PrintWriter> deque = new ArrayDeque<Writer>();
F. Map<? extends FilterOutputStream, ? super ObjectOutputStream> map = new TreeMap<PrintStream, OutputStream>();
G. Map<? extends Reader, ? super OutputStream> c = new ConcurrentHashMap<InputStreamReader, Writer>();