06 2023 档案

摘要:1.编写一个程序,实现从命令行参数输入两 个字符串类型的数值,并计算输出两个数值的 和。 [必做题] package xhy; import java.util.Scanner; public class Text { public static void main(String[] args) { 阅读全文
posted @ 2023-06-16 01:10 徐慧羽 阅读(10) 评论(0) 推荐(0) 编辑
摘要:1 package xhy; import java.util.Scanner; public interface Fruit{ } class Apple implements Fruit{ public Apple() { System.out.println("创建了一个苹果对象"); } } 阅读全文
posted @ 2023-06-16 01:04 徐慧羽 阅读(12) 评论(0) 推荐(0) 编辑
摘要:1. 设计三个类,分别如下:(知识点:抽象类及抽象方法) [必做题]• 3.1 设计Shape表示图形类,有面积属性area、周长属性per,颜色属性color,有两个构造方法(一个是默认的、一个是为颜色赋值的),还有3个抽象方法,分别是:getArea计算面积、getPer计算周长、showAll 阅读全文
posted @ 2023-06-16 01:00 徐慧羽 阅读(10) 评论(0) 推荐(0) 编辑
摘要:1. package xhy; public class Point { public static class Point{ int x; int y; public Point(int x0, int y0) { super(); this.x=x0; this.y=y0; } public P 阅读全文
posted @ 2023-06-16 00:47 徐慧羽 阅读(11) 评论(0) 推荐(0) 编辑
摘要:1.编写一个方法,实现冒泡排序(由小到大),并调用该方法 package xhy; import java.util.Scanner; public class Text { public static void main(String[] args) { // TODO Auto-generate 阅读全文
posted @ 2023-06-09 09:13 徐慧羽 阅读(14) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示