fork download
  1. class Ideone {
  2. public static void main (String[] args) throws java.lang.Exception {
  3. long t1 = System.currentTimeMillis();
  4.  
  5. for(int i = 0; i < 9000000; i++) {
  6. boolean even = ((10000000 % 2) == 0) ;
  7. }
  8.  
  9. long t2 = System.currentTimeMillis();
  10.  
  11. for(int i = 0; i < 9000000; i++) {
  12. boolean even = ((10000000 & 1) == 0) ;
  13. }
  14.  
  15. long t3 = System.currentTimeMillis();
  16.  
  17. System.out.println("TIME: " + (t2 - t1));
  18. System.out.println("TIME: " + (t3 - t2));
  19. }
  20. }
Success #stdin #stdout 0.09s 381248KB
stdin
Standard input is empty
stdout
TIME: 9
TIME: 12