Java中泛型与集合 定义一个泛型累Point,包含x,y两个T类型成员,定义两个带参数的构造方法,定义translate()方法将点移到新的坐标 public class Point <T>{ T x, y ; public Point(T x, T y)