摘要: 1、定义一个点类Point, 包含2个成员变量x、y分别表示x和y坐标,2个构造器Point()和Point( intx0,y0),以及一个movePoint (int dx,intdy)方法实现点的位置移动,创建两个Point对象p1、p2, 分别调用movePoint方法后,打印pl和p2的坐标 阅读全文
posted @ 2021-05-21 22:44 计算机1903刘瑞鹏 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 1.编写一个方法,实现冒泡排序(由小到大),并调用该方法 package week10; public class PaiXu { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated 阅读全文
posted @ 2021-05-07 15:48 计算机1903刘瑞鹏 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 1、编写一个简单程序,要求数组长度为5,分别赋值10,20,30,40,50,在控制台输出该数组的值。 package arrays; public class Test01 { /** * @param args */ public static void main(String[] args) 阅读全文
posted @ 2021-04-23 15:41 计算机1903刘瑞鹏 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 1.编写一个简单程序,要求数组长度为5,静态赋值10,20,30,40,50,在控制台输出该数组的值 package testArray; public class Test02 { /** * @param args */ public static void main(String[] args 阅读全文
posted @ 2021-04-16 09:56 计算机1903刘瑞鹏 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 1.使用for循环计算1-100的和,除了以3结尾的那些数 package week06; public class Test01 { /** * @param args */ public static void main(String[] args) { // TODO Auto-generat 阅读全文
posted @ 2021-04-09 15:51 计算机1903刘瑞鹏 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 1.分别使用for循环, while循环,do循环求1到100之间所有能被3整除的整数的和。(知识点:循环语句) package week05; public class Test04 { /** * @param args */ public static void main(String[] a 阅读全文
posted @ 2021-04-02 15:55 计算机1903刘瑞鹏 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 1 输入年份月份,输出该月的天数(闰年2月29天,条件参考上机练习1) package week05; import java.util.Scanner; public class Homework { /** * @param args */ public static void main(Str 阅读全文
posted @ 2021-03-26 12:30 计算机1903刘瑞鹏 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 1.输入商品单价,数量,求总价。活动8折后抹零,计算活动价。输入付款金额,计算找零并输出。 package work; import java.util.Scanner; public class Test12 { /** * @param args */ public static void ma 阅读全文
posted @ 2021-03-25 17:54 计算机1903刘瑞鹏 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 1.编写一个程序,定义圆的半径,求圆的面积. package work; public class Test07 { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method 阅读全文
posted @ 2021-03-12 09:29 计算机1903刘瑞鹏 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 1.输出学号班级和姓名 package Text1; public class Exe01 { /** * @param args */ public static void main(String[] args) { System.out.println("193230315计算机1903刘瑞鹏" 阅读全文
posted @ 2021-03-05 10:03 计算机1903刘瑞鹏 阅读(201) 评论(0) 推荐(0) 编辑