摘要: n most cases JOINs are faster than sub-queries and it is very rare for a sub-query to be faster.In JOINs RDBMS can create an execution plan that is be... 阅读全文
posted @ 2015-08-18 21:11 glf2046 阅读(78) 评论(0) 推荐(0) 编辑
摘要: Factory methods are used in test-driven development to allow classes to be put under test.For example you have below snippet of code to create and sen... 阅读全文
posted @ 2015-08-18 21:09 glf2046 阅读(85) 评论(0) 推荐(0) 编辑
摘要: ## type witnessThe generic method addBox defines one type parameter named U. Generally, a Java compiler can infer the type parameters of a generic met... 阅读全文
posted @ 2015-08-18 21:07 glf2046 阅读(271) 评论(0) 推荐(0) 编辑
摘要: ##Target TypesThe Java compiler takes advantage of target typing to infer the type parameters of a generic method invocation. The target type of an ex... 阅读全文
posted @ 2015-08-18 21:05 glf2046 阅读(112) 评论(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-08-18 20:44 glf2046 阅读(132) 评论(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 loc... 阅读全文
posted @ 2015-08-18 20:43 glf2046 阅读(164) 评论(0) 推荐(0) 编辑
摘要: ##public finalvoidsetDaemon(booleanon)Marks this thread as either a daemon thread or a user thread. The Java Virtual Machine exits when the only threa... 阅读全文
posted @ 2015-08-18 20:42 glf2046 阅读(94) 评论(0) 推荐(0) 编辑
摘要: # lock across processe.g. Server handles request from different clients, there clients are essentially different processes, they could potentially wri... 阅读全文
posted @ 2015-08-18 20:38 glf2046 阅读(203) 评论(0) 推荐(0) 编辑