摘要:
原文地址:http://blog.sina.com.cn/s/blog_75247c770100yxpb.html面试的时候,常常会被问到这样一个问题:请您写出一个单例模式(Singleton Pattern)吧。好吧,写就写,这还不容易。顺手写一个:publicfinalclassEagerSingleton {privatestaticEagerSingletonsingObj=newEagerSingleton();privateEagerSingleton(){ }publicstaticEagerSingletongetSingleInstance(){ returnsingObj; 阅读全文
摘要:
NanoHTTPD 1 // ================================================== 2 // Socket & server code 3 // ================================================== 4 5 /** 6 * Starts a HTTP server to given port.<p> 7 * Throws an IOException if the socket is already in use 8 */ 9 ... 阅读全文