我就不废话那么多,直接上代码: package sf.com.mainTest; public class Test { public static void main(String[] args) { System.out.println(new Test().isBool(null)); } public boolean isBool(String a){ return a.equals("true"); // return "null".equals(a);…
一,多线程 多线程是提高程序效率,避免资源浪费的很好的解决方案,下面来慢慢的介绍多线程的一些基本知识,而这些是晋级高级不可或缺的一部分 1,Thread类 类实现多线程需要实现Runnable接口,我们跟踪一下源码,如下所示: public class Thread implements Runnable { /* Make sure registerNatives is the first thing <clinit> does. */ private static native void…