鉴于现状:
class School
{
public void print(){}
}
class Grade extends School{}
class Student extends School{}
什么是这个的区别。
public <E extends School> void someMethod(E someObj)
{
//now we can pass any object that extends school
//and we have access to any methods that are in school
someObj.print();
}
还有这个呢?
public void someMethod(School someObj)
{
someObj.print();
}