Which of the following can be used to replace YYYYYYYY in the following code? public class WildCardDemo3 {
public static void main(String[] args) {
GenericStack stack1 = new GenericStack<>();
GenericStack stack2 = new GenericStack<>();
stack2.push("Java");
stack2.push(2);
stack1.push("Sun");
add(stack1, stack2);
WildCardDemo2.print(stack2);
}
public static void add(GenericStack stack1,
GenericStack stack2) {
while (!stack1.isEmpty())
stack2.push(stack1.pop());
}
}
A. ? super Object
B. ? super T
C. ? extends T
D. ? extends Object