Choice:
A. compiler error at line 5
B. compiler error at line 12
C. compiler error at line 15
D. compiler error at line 16
E. 201null
F. 20nullnull
G. 202a
H. code compiles but throws exception at runtime
Explain: class Node is a generic class with two type parameters. At line 5, the constructor took 3 parameters, key with type K, value with type V, and next node with type Node<K, V>. Line 14 and 15 declares the type parameter: K is Integer and V is String. b's constructor then is public Node(Integer key, String value, Node<Integer, String> next), so a as Node<Integer, Integer> can not be supplied to b's constructor without compiler error at line 15. The compiler error is: Node.java:15: error: cannot infer type arguments for Node<> Selecting D is subtle. The compiler error is: Node.java:16: error: bad operand types for binary operator '+' This is because b.getValue() is integer, b.getNext().getKey() is also integer, add them get integer. Add integer to Node<Integer,Integer> is illegal (can add String to Node<Integer,Integer>). If b has the same type as a, the answer will be E. At line 16, b.getNext() returns a, b.getNext().getNext() then returns null.