摘要:
也是看了 渴死的火烈鸟 的博客才意识到的。原文http://standalone.iteye.com/blog/1876771import java.util.concurrent.DelayQueue;public class DelayQueueExample { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub DelayQueue dq=new DelayQueue();... 阅读全文
摘要:
示例:public class TestAssert { public static void main(String[] args) { assert false: "Exception Assert"; }}格式:assertexpression1: expression2expression1为布尔类型表达式expression2为抛出异常的信息eclipse运行时需带上参数输出结果为:Exception in thread "main" java.lang.AssertionError: Exception Assert at com.xqy.T 阅读全文
摘要:
Java中的transient,是用于声明序列化的时候不被存储的示例:博客原文:http://www.blogjava.net/liuganquan/archive/2007/04/22/112591.htmlpublic class Logon implements Serializable { private Date date = new Date(); private String username; private transient String password; Logon(String name, String pwd) { us... 阅读全文