Given:
public class Test<T> {
private T t;
public T get () {
return t;
}
public void set (T t) {
this.t = t;
}
public static void main (String args [ ] ) {
Test<String> type = new Test<>();
Test type 1 = new Test (); //line n1
type.set("Java");
type1.set(100); //line n2
System.out.print(type.get() + " " + type1.get());
}
}
What is the result?
jduarte
Highly Voted 3 years, 6 months agoasdfjhfgjuaDCV
Most Recent 4 months, 3 weeks agosteefaand
5 months, 3 weeks agoDangNHH
1 year, 4 months agor1muka5
1 year, 5 months agoWilsonKKerll
2 years, 4 months agoYasinGaber
2 years, 5 months ago