fork download
  1. /* package whatever; // don't place package name! */
  2. import java.time.Instant;
  3. import java.time.temporal.Temporal;
  4. import java.time.temporal.ChronoUnit;
  5. import java.util.*;
  6. import java.lang.*;
  7. import java.io.*;
  8.  
  9. /* Name of the class has to be "Main" only if the class is public. */
  10. class Ideone
  11. {
  12. public static void main (String[] args) throws java.lang.Exception
  13. {
  14. Instant previous, current, gap;
  15. current = Instant.now();
  16. if(pervious != null) {
  17. gap = ChronoUnit.MILLIS,between(previous,current);
  18. }
  19.  
  20. }
  21. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:17: error: ';' expected
				gap = ChronoUnit.MILLIS,between(previous,current);
				                       ^
1 error
stdout
Standard output is empty