Код: Выделить всё
import java.util.Arrays;
import java.util.List;
class HelloWorld {
public static void main(String[] args){
ttt();
}
public static void ttt(){
List result;
result = kkk();
// String ll = result.get(0);
// ll.split(",");
if(result.get(0) instanceof String){
System.out.println("alsfjalsdfjaslkfj");
}else{
System.out.println("Long Long");
}
System.out.println(result);
}
public static R kkk(){
List x = Arrays.asList(2L, 2L, 3L);
return (R) x;
}
}
Подробнее здесь: https://stackoverflow.com/questions/788 ... g-generics