ClassLoader: setDefaultAssertionStatus(boolean enabled) : ClassLoader « java.lang « Java by API






ClassLoader: setDefaultAssertionStatus(boolean enabled)

   

public class Main {
  public static void main(String[] args) {
    ClassLoader.getSystemClassLoader().setDefaultAssertionStatus(true);
    new Loaded().go();
  }
}

class Loaded {
  public void go() {
    assert false: "Loaded.go()";
  }
}

   
    
    
  








Related examples in the same category

1.extends ClassLoader
2.ClassLoader: getSystemClassLoader()
3.ClassLoader: loadClass(String name)