摘要:
1.定义一个点类Point,包含两个成员变量x,y分别表示x和y坐标,2个构造器Point( )和Point(int x0,int y0),以及一个movePoint(int dx,int dy)方法实现点的位置移动,创建两个Point对象p1、p2,分别调用movePoint方法后,打印p1和p2 阅读全文
posted @ 2021-05-22 17:15
青鸢°
阅读(64)
评论(0)
推荐(0)
摘要:
课堂练习:两个数求平方和 public class MyMethod { public static int sum(int a, int b) { return a * a + b * b; } public static void main(String[] args) { System.out 阅读全文
posted @ 2021-05-07 16:23
青鸢°
阅读(54)
评论(0)
推荐(0)