Company: ICICI_MCQ
Difficulty: medium
What is the output of the following Java code: public class Main { public static void main(String[] args) { IntegerBox<Integer> intBox = new IntegerBox<>(7); IntegerBox<Integer> anotherIntBox = new IntegerBox<>(3); System.out.println(intBox.getIncrementedValue() * anotherIntBox.getIncrementedValue()); } } class Box<T> { T content; Box(T item) { content = item; } T getContent() { return content; } } class IntegerBox<I extends Integer> extends Box<I> { IntegerBox(I item) { super(item); } int getIncrementedValue() { return getContent() + 1; } } 10 21 32 40 What is the output of the following Java code: public class Main { public static void main(String[] args) { B b = new B(); b.display(); } } class A { int x = 5; } class B extends A { int x = 10; void display() { System.out.println(x + " " + super.x); } } 10 5 10 5 5 10 What is the output of the following Java code: public class Main { public static void main(String[] args) { AbstractFactory fact