1 public class JAssert2 { 2 public static void main (String [] args) { 3 int x = 0; 4 JAssert2.class.getClassLoader().setClassAssertionStatus("MyAsserts", true); 5 MyAsserts.run(); 6 } 7 } 8 class MyAsserts { 9 static void run(){ 10 int x = 0; 11 assert x < 2 ? true: false; 12 assert x < 2 ? true: false: false; 13 assert x < 2 ? true: false: "bug" ; 14 } 15 } 16 | Popular Tags |