上一页 1 2 3 4 5 6 ··· 39 下一页
摘要: package com.tedu.test; /** * 单例设计模式 懒汉式设计 * 优点:不会造成资源的浪费 * 缺点:会造成线程安全问题 */ public class singleonDemo { public static void main(String[] args) { single 阅读全文
posted @ 2022-11-10 12:21 竹石2020 阅读(12) 评论(0) 推荐(0) 编辑
摘要: package com.tedu.test; /** * 单例设计模式的实现 饿汉式 * 缺点:比较浪费资源 * 优点:饿汉式实现方式不会存在线程安全问题 * 单例设计模式的原则:实例唯一 */ public class singleDemo { public static void main(St 阅读全文
posted @ 2022-11-10 12:05 竹石2020 阅读(10) 评论(0) 推荐(0) 编辑
摘要: package com.tedu.day16; import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer; import java.lang.reflect.Constructor; import java.lang.reflec 阅读全文
posted @ 2022-11-09 19:44 竹石2020 阅读(10) 评论(0) 推荐(0) 编辑
摘要: package com.tedu.threadStudy; public class studyTicket { public static void main(String[] args) { YouThread youThread = new YouThread(); Thread thread 阅读全文
posted @ 2022-11-07 23:19 竹石2020 阅读(50) 评论(0) 推荐(0) 编辑
摘要: package com.tedu.threadStudy; public class studyThread { public static void main(String[] args) { MyThread th1 = new MyThread("线程1"); MyThread th2 = n 阅读全文
posted @ 2022-11-07 22:39 竹石2020 阅读(11) 评论(0) 推荐(0) 编辑
摘要: package com.tedu.study01; import java.util.*; public class TestMap { public static void main(String[] args) { System.out.println("输入需要统计的字符串:"); Strin 阅读全文
posted @ 2022-11-07 21:40 竹石2020 阅读(69) 评论(0) 推荐(0) 编辑
摘要: map初始容量是16 package com.tedu.study01; import java.util.HashMap; import java.util.Map; public class study_Map { public static void main(String[] args) { 阅读全文
posted @ 2022-11-07 21:27 竹石2020 阅读(47) 评论(0) 推荐(0) 编辑
摘要: set集合的学习 set集合可以去重,不能重复添加 package com.tedu.study01; import java.util.HashSet; import java.util.Iterator; import java.util.Set; public class Study_Set 阅读全文
posted @ 2022-11-07 19:44 竹石2020 阅读(12) 评论(0) 推荐(0) 编辑
摘要: package com.tedu.day1302; import java.util.ArrayList; import java.util.Collection; public class Study_Collection { public static void main(String[] ar 阅读全文
posted @ 2022-11-06 23:11 竹石2020 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 泛型的使用 package com.tedu.day1302; public class Study_T { public static void main(String[] args) { String[] arr1 = {"a","b","c","d"}; Integer[] arr2 = {1 阅读全文
posted @ 2022-11-06 19:51 竹石2020 阅读(12) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 39 下一页