JAVA编程问题 定义一个泛型类Point,它包含横坐标x和纵坐标y两个变量,类型均为T

日期:2018-04-23 20:06:24 人气:1

JAVA编程问题 定义一个泛型类Point,它包含横坐标x和纵坐标y两个变量,类型均为T

public class Point { private T x; private T y; public Point(T x, T y) { this.x = x; this.y = y; } public T getX() { return x; } public void setX(T x) { this.x = x; } public T getY() { return y; } public void setY(T y) { this.y
    A+
热门评论