摘要: Ref:How to get file name without the extension?Normally,there are two ways to implements this:use the library or the regular expression.here I use the... 阅读全文
posted @ 2014-03-02 02:56 wonkju 阅读(756) 评论(0) 推荐(0) 编辑
摘要: Ref:check whether a file or directoryFirst, make sure the path exists by using:new File(path).exists();Then check whether it a directory using:1 new F... 阅读全文
posted @ 2014-03-02 01:41 wonkju 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 本人目前也开始学习虚拟机,在java中,有很多种类型的虚拟机,其中就以sum公司(当然现在已经是oracle了)的虚拟机为例,介绍可能在面试的时候用到的,同时对自己了解String有很大帮助,这里仅仅是笔记的整理(张龙老师的). 1 class StringDemo { 2 public... 阅读全文
posted @ 2014-01-20 10:19 wonkju 阅读(505) 评论(0) 推荐(0) 编辑
摘要: 我们知道对于操作符 "==",如果比较的是原生类型(primitive type),表示的是 '值本身'是否相等;而对于引用类型(reference type),表示的是 '对象的地址'是否相等. java中Object 类的源代码为(表示'对象地址'是否相等):1 public boolea... 阅读全文
posted @ 2014-01-20 02:30 wonkju 阅读(391) 评论(0) 推荐(0) 编辑
摘要: Ref:should I use PrintWriter to wrap BufferedWriter?The main reason for using PrintWriter is the wealth of convenience functions which do intelligent ... 阅读全文
posted @ 2014-01-19 18:42 wonkju 阅读(1150) 评论(0) 推荐(0) 编辑
摘要: Ref: stackoverflow We usesingle global LogManagerto maintain a set of shared state about Loggers and log services.Manages a hierarchical namespace o... 阅读全文
posted @ 2014-01-19 01:38 wonkju 阅读(864) 评论(0) 推荐(0) 编辑
摘要: Ref:http://java.chinaitlab.com/Eclipse/812775.htmlandhttp://www.javavids.com/video/how-to-create-an-executable-jar-file-in-eclipse.html Right now y... 阅读全文
posted @ 2014-01-18 19:00 wonkju 阅读(487) 评论(0) 推荐(0) 编辑
摘要: If a subclass defines a static method with the same signature as a static method in the superclass, then the method in the subclasshidesthe one in t... 阅读全文
posted @ 2014-01-18 18:55 wonkju 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Ref: java回调函数 所谓回调,就是客户程序C调用服务程序S中的某个函数sMethod,然后S又在某个时候反过来调用C中的某个函数cMethod,对于C来说,这个cMethod便叫做回调函数。例如Win32下的窗口过程函数就是一个典型的回调函数。一般说来,C不会自己调用cMethod,C提供... 阅读全文
posted @ 2014-01-18 18:44 wonkju 阅读(237) 评论(0) 推荐(0) 编辑
摘要: Many times, we often needs to detach our databases if we want to copy it to another database instances,or even another machine, here is a simple t-... 阅读全文
posted @ 2014-01-17 20:16 wonkju 阅读(520) 评论(0) 推荐(0) 编辑