Computer Science, asked by kadamsidharth8, 8 months ago

class Demo<T>
Tt:
Demo (Tt) {
this.t = t;
}
public T DemoMethod()
return this.t;
}
public class Main
{
public static void main (String[] args)
Demo <Integer> i = new Demo<Integer
System.out.println(i. DemoMethod());
Demo <Double> f = new Demo<Double>
System.out.println(f. DemoMethod());
)


.
Which of the following is true?
a. The program will give run-time error.
b. The program has syntax error.
c. It produces the following output:
5
14.6
d. The program will give compile-time error.​

Answers

Answered by pankaj7570041621
1

Answer:

answer will be option d

Error cause while compiling

Similar questions