Question 1
Consider the Java code given below.
class Printer { public <T extends Number> void printDetails(T value) { // LINE 1 System.out.println("Number: " + (value.doubleValue() * 3)); } public <U extends Number> void printDetails(U value) { // LINE 2 System.out.println("Double Number: " + (value.doubleValue() * 6)); } public <T> void printDetails(T value) { // LINE 3 System.out.println("Value: " + value); }}public class Test { public static void main(String[] args) { Printer p = new Printer(); p.printDetails(7); p.printDetails(3.5); p.printDetails("Java"); }}Choose the correct option.
