Java定义一个Point(点)类
Java定义一个Point(点)类
日期:2019-03-14 14:05:35 人气:1
public class Point
{
public static void main(String[] args)
{
Point p1=new Point();
Point p2=new Point(1,2);
p1.show();
p1.move(3,4);
p1.show();
p2.show();
p2.move(5,6);
p2.show();
}
Point()
{
this(0,0);
}
Point(float x,float y