fork download
  1. import java.time.Instant;
  2.  
  3. public class Main {
  4. public static void main(String[] args) {
  5. Instant instant1 = Instant.parse("2015-04-22T19:54:11.827Z");
  6. Instant instant2 = Instant.parse("2015-04-22T19:54:11.0Z");
  7. System.out.println(instant1);
  8. System.out.println(instant2);
  9. }
  10. }
Success #stdin #stdout 0.1s 56700KB
stdin
Standard input is empty
stdout
2015-04-22T19:54:11.827Z
2015-04-22T19:54:11Z