class Father{
    private int x;                               //子类不能继承的变量定义
    public int getX() {
        return x;
    }
    public void setX(int x) {
        this.x = x;
    }
}
class Son extends Father{
    int y;
    public int getY() {
        return y;
    }
    public void setY(int y) {
        this.y = y;
    }
}
class Example4_3{
    public static void main(String args[]){
        Son son=new Son();
        son.setX(100);                         //通过方法操作未继承的变量
        System.out.println("子类未继承的变量x的值是"+son.getX());
        son.setY(200);
        System.out.println("子类对象变量y的值是"+son.getY());
    }
}
