Returns the corresponding number of nanoseconds from the start of the second of this Instant object.
package com.logicbig.example.instant;
import java.time.Instant;
public class GetNanoExample {
public static void main(String... args) {
Instant i = Instant.now();
System.out.println(i);
int n = i.getNano();
System.out.println(n);
}
}
Output
2017-05-01T20:57:53.587Z
587000000