Java Instant plusNanos() methodThe plusNanos() method of Java Instant class is used to return a copy of the instant with the specified duration in nanoseconds added This instance is immutable and unaffected by this method call. SyntaxParameternanosToAdd ? It specifies the nanoseconds to add. It can be either positive or negative. Return
ExceptionDateTimeException - If the result exceeds the maximum or minimum instant ArithmeticException - If numeric overflow occurs Example 1Output: 2018-02-03T10:15:40Z Example 2Output: 0 70000 Example 3Output: 2018-05-01T20:57:16.073Z 2018-05-01T20:57:16.075Z 2018-05-01T20:57:16.070Z Next TopicJava-instant-plusmillis-method |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India