摘要: 要使assert起作用,要有-ea选项,对eclipse,可以这样设置http://www.vogella.com/blog/2009/02/06/enabling-java-assertions-per-default-in-eclipse-runtime-configuration/一个简单测试public class TestAssert { public static void main(String[] args) { assert false; System.out.println("test"); }}输出:Exception in thr... 阅读全文
posted @ 2013-03-02 10:58 ttang 阅读(1587) 评论(0) 推荐(0) 编辑