2016年2月6日
摘要: In this example we will see how and when to use java.util.TreeMap. A TreeMap is a Map implementation which provides total ordering on its elements. Th 阅读全文
posted @ 2016-02-06 21:44 gyt929458988 阅读(238) 评论(0) 推荐(0)
  2016年2月5日
摘要: 今天看了一篇文章是将Integer的进阶用法的,拿来一块学习下 Why YOU should use Integer.valueOf(int) In particular, why you should use Integer.valueOf(int) instead of new Integer( 阅读全文
posted @ 2016-02-05 22:33 gyt929458988 阅读(271) 评论(0) 推荐(0)
  2016年2月4日
摘要: 题目 : 有三个线程分别打印A、B、C,请用多线程编程实现,在屏幕上循环打印10次ABCABC… package my.thread.test; import java.util.concurrent.ExecutorService; import java.util.concurrent.Exec 阅读全文
posted @ 2016-02-04 09:14 gyt929458988 阅读(427) 评论(0) 推荐(0)
  2016年1月31日
摘要: As per java docs, CountDownLatch is a synchronization aid that allows one or more threads to wait until a set of operations being performed in other t 阅读全文
posted @ 2016-01-31 11:42 gyt929458988 阅读(305) 评论(0) 推荐(0)
  2016年1月29日
摘要: In SpringMVC, @ModelAttribute is used at 2 places.1. At Method level2. At Method parameter level.How @ModelAttribute at method level works? package co 阅读全文
posted @ 2016-01-29 15:10 gyt929458988 阅读(542) 评论(0) 推荐(0)
  2016年1月17日
摘要: class TrieNode { public TrieNode[] children = new TrieNode[26]; public String item = ""; // Initialize your data structure here. ... 阅读全文
posted @ 2016-01-17 10:31 gyt929458988 阅读(237) 评论(0) 推荐(0)
  2016年1月15日
摘要: What is Memory Leak?Memory leak is a bug that mainly occurs when a program does not release the memory it has obtained for temporary use. In other wor... 阅读全文
posted @ 2016-01-15 19:31 gyt929458988 阅读(257) 评论(0) 推荐(0)
  2016年1月12日
摘要: Fixed Thread PoolAn asynchronous channel group associated with a fixed thread pool of sizeN, submitsNtasks that wait on I/O or completion events from ... 阅读全文
posted @ 2016-01-12 00:03 gyt929458988 阅读(195) 评论(0) 推荐(0)
  2016年1月11日
摘要: 一.EventEncoder和EventDecoder事件编码器会收到一个事件对象(event object)然后将这个事件对象转换成为ChannelBuffer对象。编码器首先读取事件的类型并作为操作码(缓冲区的第一个字节),然后读取事件体并转换成为ChannelBuffer对象作为信息体。/**... 阅读全文
posted @ 2016-01-11 17:04 gyt929458988 阅读(638) 评论(0) 推荐(0)
摘要: 用法一:给通道添加异步接口public void close() { LOG.debug("Going to close tcp connection in class: {}", this .getClass().getName()); ... 阅读全文
posted @ 2016-01-11 16:53 gyt929458988 阅读(6004) 评论(0) 推荐(0)