摘要: 课后作业: 1、定义一个点类Point, 包含2个成员变量x、y分别表示x和y坐标,2个构造器Point()和Point( intx0,y0),以及一个movePoint (int dx,intdy)方法实现点的位置移动,创建两个Point对象p1、p2, 分别调用movePoint方法后,打印pl 阅读全文
posted @ 2021-05-21 21:12 MXT16 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 练习: 求平方和 1 package boke5月7日; 2 3 public class M1 { 4 public static void square(double a, int b) { 5 int sum = (int) (a * a + b * b); 6 System.out.prin 阅读全文
posted @ 2021-05-07 17:55 MXT16 阅读(64) 评论(0) 推荐(0) 编辑
摘要: 上机练习 1、编写一个简单程序,要求数组长度为5,分别赋值10,20,30,40,50,在控制台输出该数组的值。(知识点:数组定义和创建、一维数组初始化)[必做题]? 1 package array; 2 3 public class Array1 { 4 5 /** 6 * @param args 阅读全文
posted @ 2021-04-23 18:54 MXT16 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 上机练习 1.编写一个简单程序,要求数组长度为5,静态赋值10,20,30,40,50,在控制台输出该数组的值。 1 package boke4月16日; 2 3 public class ShuZu1 { 4 5 /** 6 * @param args 7 */ 8 public static v 阅读全文
posted @ 2021-04-16 17:31 MXT16 阅读(51) 评论(0) 推荐(0) 编辑
摘要: 上机练习: 1.使用for循环计算1-100的和,除了以3结尾的那些数 1 package boke4月9日; 2 3 public class Best1 { 4 5 /** 6 * @param args 7 */ 8 public static void main(String[] args) 阅读全文
posted @ 2021-04-09 23:16 MXT16 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 上机练习 1.分别使用for循环,while循环,do循环求1到100之间所有能被3整除的整数的和。(知识点:循环语句) for循环: 1 package boke4月2日; 2 3 public class Q11 { 4 5 /** 6 * @param args 7 */ 8 public s 阅读全文
posted @ 2021-04-02 18:50 MXT16 阅读(58) 评论(0) 推荐(0) 编辑
摘要: 上机练习 1.输入一个年份,判断是不是闰年(能被4整除但不能被100整除,或者能被400整除) 1 package test; 2 3 import java.util.Scanner; 4 5 public class Test1 { 6 7 /** 8 * @param args 9 */ 10 阅读全文
posted @ 2021-03-26 21:32 MXT16 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 1.编写一个程序,定义圆的半径,求圆的面积。 1 package week2; 2 3 public class Week1 { 4 5 /** 6 * @param args 7 */ 8 public static void main(String[] args) { 9 // TODO Aut 阅读全文
posted @ 2021-03-12 10:26 MXT16 阅读(57) 评论(0) 推荐(0) 编辑
摘要: 1.输出学号班级和姓名 public class Exe1 { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("1 阅读全文
posted @ 2021-03-07 15:42 MXT16 阅读(42) 评论(0) 推荐(0) 编辑