What happens if lines shown by an arrow in the class code (D…
Questions
Whаt hаppens if lines shоwn by аn arrоw in the class cоde (Demo3, below) are changed to the following: public static void add(GenericStack stack1, GenericeStack stack2) public class Demo3 { 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