慕设计0026821
2018-05-07 15:15

public class Point{ //点类
int x ; //横坐标属性
int y ; //纵坐标属性
public Point(){} //无参构造方法;
/**
*带参构造方法
*x为横坐标属性
*y为纵坐标属性
*/
public Point(int x ,int y){
this x = x;
this y = y;
}}
//Line同上。
Java入门第一季(IDEA工具)
1168094 学习 · 18754 问题
相似问题