public class Da {
public static <A,T>T add(A a, T b) {
return b;
}
public static void main(String[] args) {
String a = "aaa";
Integer b = 9;
System.out.println(add(a,b));
}
}
- Generic method defined in the return value, to the plurality of words separated by commas.
- It can also be defined on the class.