![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
javase
码农保护地球
Talk is cheap, Show me the code!
展开
-
读取mac地址
import java.io.*; public class ReadMAC { public static String physicalAddress = "read MAC error!"; public ReadMAC() { } public sta原创 2011-07-28 16:33:00 · 527 阅读 · 0 评论 -
singleton 第二种要加锁
第二种形式:public class Singleton { private static Singleton instance = null ; public static synchronized Singleton getInstance() { // 这个方法比上面有所改进,不用每次都进行生成对象,只是第一次转载 2012-02-13 14:51:53 · 487 阅读 · 0 评论