Point.java

来源:互联网 发布:微博公众号域名 编辑:程序博客网 时间:2024/05/22 00:45

public class Point implement Cloneable{

  private int x;

  private int y;

 

  public Point(){}

  public Point(int x,int y){

    this.x=x;

    this.y=y;

  }

 

  public void setX(int x){this.x=x;}

  public void setY(int y){this.y=y;}

 

  public int getX(){return x;}

  public int getY(){return y;}

 

  public Object clone() throws CloneNotSupportedException{

    return super.clone();

  }

}

原创粉丝点击