摘要: Reference: http://beginnersbook.com/2013/12/difference-between-arraylist-and-vector-in-java/JAVA COLLECTIONSArrayListandVectorboth use Array as a data... 阅读全文
posted @ 2015-10-16 17:01 glf2046 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Singletonpattern vsStatic Class (a class, having all static methods) is another interesting questions, which I missed while blogging aboutInterview qu... 阅读全文
posted @ 2015-10-16 15:48 glf2046 阅读(409) 评论(0) 推荐(0) 编辑
摘要: ######## Key points extracted from below ####################1. Consider the following snippet of code:Integer aa = new Integer(100);Integer bb = new ... 阅读全文
posted @ 2015-10-16 15:32 glf2046 阅读(126) 评论(0) 推荐(0) 编辑
摘要: ################## key points extracted ###########################The rule for a method invocation that uses autoboxing/unboxing follows a two-step p... 阅读全文
posted @ 2015-10-16 15:32 glf2046 阅读(136) 评论(0) 推荐(0) 编辑
摘要: AutoBoxing and unboxing are features added in Java 5 to work with primitive data types and their corresponding wrapper classes. They are implemented c... 阅读全文
posted @ 2015-10-16 15:31 glf2046 阅读(182) 评论(0) 推荐(0) 编辑
摘要: http://www.javaworld.com/article/2074979/java-concurrency/double-checked-locking--clever--but-broken.html 阅读全文
posted @ 2015-10-16 15:30 glf2046 阅读(94) 评论(0) 推荐(0) 编辑
摘要: The following program prints out all distinct words in its argument list. Two versions of this program are provided. The first uses JDK 8 aggregate op... 阅读全文
posted @ 2015-10-16 15:29 glf2046 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Java coding style:1. Factory method should be stateless.State normally refers to the member variables of class. Stateless, more precisely, it means im... 阅读全文
posted @ 2015-10-16 15:28 glf2046 阅读(132) 评论(0) 推荐(0) 编辑
摘要: # lock across processe.g. Server handles request from different clients, there clients are essentially different processes, they could potentially wri... 阅读全文
posted @ 2015-10-16 15:27 glf2046 阅读(219) 评论(0) 推荐(0) 编辑
摘要: The answer is pretty simple -- use it when you actually need something it provides that synchronized doesn't,like timed lock waits, interruptible lock... 阅读全文
posted @ 2015-10-16 15:26 glf2046 阅读(224) 评论(0) 推荐(0) 编辑
摘要: http://www.javamex.com/tutorials/synchronization_final.shtmlThread-safety with the Java final keywordAs of Java 5, one particular use of the final key... 阅读全文
posted @ 2015-10-16 15:25 glf2046 阅读(124) 评论(0) 推荐(0) 编辑
摘要: http://github.thinkingbar.com/lookup-objsize/memeory algnment:http://github.thinkingbar.com/alignment/ 阅读全文
posted @ 2015-10-16 15:25 glf2046 阅读(152) 评论(0) 推荐(0) 编辑