摘要:
package com.tedu.test; /** * 单例设计模式 懒汉式设计 * 优点:不会造成资源的浪费 * 缺点:会造成线程安全问题 */ public class singleonDemo { public static void main(String[] args) { single 阅读全文
摘要:
package com.tedu.test; /** * 单例设计模式的实现 饿汉式 * 缺点:比较浪费资源 * 优点:饿汉式实现方式不会存在线程安全问题 * 单例设计模式的原则:实例唯一 */ public class singleDemo { public static void main(St 阅读全文
摘要:
package com.tedu.day16; import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer; import java.lang.reflect.Constructor; import java.lang.reflec 阅读全文
摘要:
package com.tedu.threadStudy; public class studyTicket { public static void main(String[] args) { YouThread youThread = new YouThread(); Thread thread 阅读全文
摘要:
package com.tedu.threadStudy; public class studyThread { public static void main(String[] args) { MyThread th1 = new MyThread("线程1"); MyThread th2 = n 阅读全文
摘要:
package com.tedu.study01; import java.util.*; public class TestMap { public static void main(String[] args) { System.out.println("输入需要统计的字符串:"); Strin 阅读全文
摘要:
map初始容量是16 package com.tedu.study01; import java.util.HashMap; import java.util.Map; public class study_Map { public static void main(String[] args) { 阅读全文
摘要:
set集合的学习 set集合可以去重,不能重复添加 package com.tedu.study01; import java.util.HashSet; import java.util.Iterator; import java.util.Set; public class Study_Set 阅读全文
摘要:
package com.tedu.day1302; import java.util.ArrayList; import java.util.Collection; public class Study_Collection { public static void main(String[] ar 阅读全文
摘要:
泛型的使用 package com.tedu.day1302; public class Study_T { public static void main(String[] args) { String[] arr1 = {"a","b","c","d"}; Integer[] arr2 = {1 阅读全文