摘要:
一.饿汉式,线程安全的。 package com.cal; public class SingleTon { //1.私有的构造方法,不应许new对象 private SingleTon(){} //2.自己提供一个私有的静态对象 private static SingleTon instance 阅读全文
posted @ 2017-02-06 18:13
小C30
阅读(135)
评论(0)
推荐(0)
摘要:
package com.cal; class Sock { static Object A = new Object(); static Object B = new Object();} class MyThread3 implements Runnable { private boolean f 阅读全文
posted @ 2017-02-06 17:58
小C30
阅读(321)
评论(0)
推荐(0)
摘要:
package com.cal; public class TicketsThread { public static void main(String[] args) { T tt=new T(); Thread thread=new Thread(tt,"窗口1"); Thread thread 阅读全文
posted @ 2017-02-06 15:55
小C30
阅读(2082)
评论(1)
推荐(0)
浙公网安备 33010602011771号