摘要: package com.SmallChanage; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Scanner; public class SmallChangeSys { //先完成显示菜单, 阅读全文
posted @ 2023-01-30 22:18 书先生 阅读(53) 评论(0) 推荐(0) 编辑
摘要: package com.EqualsExercise01; public class Test { /* toString的默认返回:全类名 + @ + 哈希值的十六进制, 子类往往重写toString方法 用于返回对象的属性 public String toString() { return ge 阅读全文
posted @ 2023-01-09 21:36 书先生 阅读(43) 评论(0) 推荐(0) 编辑
摘要: package com.EqualsExercise01; public class Test { /* 1.提高具有哈希结构的容器的效率 2.两个引用或者多个引用,如果指向的是同一个对象,则哈希值肯定一样。 3.两个引用或者多个引用,如果指向的不是同一个对象,则哈希值肯定不一样(一样的概率极低) 阅读全文
posted @ 2023-01-09 21:15 书先生 阅读(53) 评论(0) 推荐(0) 编辑
摘要: package com.hspedu.encap; //测试类 public class test { public static void main(String[] args) { Person[] persons = new Person[5]; //Person 类 //编译类型 运行类型 阅读全文
posted @ 2023-01-05 22:05 书先生 阅读(12) 评论(0) 推荐(0) 编辑
摘要: package com.hspedu.encap; //测试类 public class test { public static void main(String[] args) { A a = new B(); System.out.println(a.sum()); System.out.pr 阅读全文
posted @ 2023-01-04 22:55 书先生 阅读(17) 评论(0) 推荐(0) 编辑
摘要: package com.hspedu.encap; //测试类 public class test { public static void main(String[] args) { Sub s = new Sub(); System.out.println(s.count); s.display 阅读全文
posted @ 2023-01-04 21:47 书先生 阅读(9) 评论(0) 推荐(0) 编辑
摘要: import java.util.Scanner; public class Eext { public static void main(String[] args) { Cale cale = new Cale(3 , 3); System.out.println("加结果为:" + cale. 阅读全文
posted @ 2022-12-13 22:51 书先生 阅读(39) 评论(0) 推荐(0) 编辑
摘要: import java.util.Scanner; public class Eext { public static void main(String[] args) { } } //定义一个圆类Cicle,定义属性:半径,提供显示圆周长功能的办法,提供显示圆面积的方法 public Cicle 阅读全文
posted @ 2022-12-13 21:39 书先生 阅读(13) 评论(0) 推荐(0) 编辑
摘要: import java.util.Scanner; public class Eext { public static void main(String[] args) { int[] oldArr = {7,77,777}; A03 a03 = new A03(); int[] newArr = 阅读全文
posted @ 2022-12-13 21:21 书先生 阅读(14) 评论(0) 推荐(0) 编辑
摘要: import java.util.Scanner; public class Eext { public static void main(String[] args) { String[] str = {"lala" , "koko" , "joke"}; A02 a02 = new A02(); 阅读全文
posted @ 2022-12-12 21:40 书先生 阅读(101) 评论(0) 推荐(0) 编辑