OffsetTime getNano()
gets the nano-of-second field.
getNano
has the following syntax.
public int getNano()
The following example shows how to use getNano
.
import java.time.OffsetTime; /*w w w . j av a 2 s .com*/ public class Main { public static void main(String[] args) { OffsetTime m = OffsetTime.now(); int n = m.getNano(); System.out.println(n); } }
The code above generates the following result.