不知道你是什么意思不过可以这样
class A{
    private int x, y;
    public A(A a){
        this.x = a.x;
        this.y = a.y;
    }
}