2021-05-11

package com.edu.xcdq;

class Pair {

// 私有属性

    private T first;

    private T second;

    // 构造方法

    public Pair() {

}

public Pair(T first, T second) {

this.first = first;

        this.second = second;

    }

// getter setter

    public T getFirst() {

return first;

    }

public void setFirst(T first) {

this.first = first;

    }

public T getSecond() {

return second;

    }

public void setSecond(T second) {

this.second = second;

    }

//toString

}

你可能感兴趣的:(2021-05-11)