Number> list)
{
// do something ...
}
static <T extends Number> void get2(List<T> list)
{
// do something ...
}
Inside the second method, you can operate over T type like: T number = //assign something
And you can also use T as return type (or inside generic expression of return type)
Обсуждают сегодня