fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. assert true;
  13. Bar.foo();
  14. }
  15.  
  16. static class Bar{
  17. public static void foo(){
  18. boolean enabled = false;
  19. assert enabled = true;
  20. System.out.println("Asserts " +
  21. (enabled ? "enabled" : "disabled"));
  22. }
  23. }
  24. }
Success #stdin #stdout 0.14s 50216KB
stdin
Standard input is empty
stdout
Asserts disabled