随笔分类 -  Java

遍历Java Map
摘要:1 //1, get both key and value 2 for(Entry entry : map.entrySet()) 3 { 4 Integer key = entry.getKey(); 5 Strin... 阅读全文

posted @ 2016-01-21 16:35 万木春 阅读(185) 评论(0) 推荐(0)

Java中的Marker Interfaces有什么用
摘要:Marker Interfaces就是没有方法的空接口,如Serializable, Clonnable, Remote,等等,它们存在的意义是什么呢?标准回答是:used to indicate something to compiler or JVM.其实,Annotation也具有同样的能力,... 阅读全文

posted @ 2014-12-08 17:44 万木春 阅读(311) 评论(0) 推荐(0)

有关Ehcache的内容的引用和Java的deep copy
摘要:项目使用Ehcache来作为程序和数据库之间的缓冲,使用过程中会对cache对象做修改, 如plan.setLangSymbol(),发现后面使用cache的地方,取到的数据都是修改后的,所以猜测是cache的浅引用造成的。实际上,stackoverflow也有人提到此问题《Cache.get() ... 阅读全文

posted @ 2014-11-27 17:38 万木春 阅读(548) 评论(0) 推荐(0)

本地Java程序访问HTTPs遇到的问题
摘要:Java程序访问HTTPs服务遇到的问题及workaround 阅读全文

posted @ 2014-09-25 13:51 万木春 阅读(745) 评论(0) 推荐(0)

导航