Java Instant plusMillis() methodThe plusMillis() method of Java Instant class is used to return a copy of the instant with the specified duration in milliseconds added. This instance is immutable and unaffected by this method call. SyntaxParametermillisToAdd ? It specifies the milliseconds 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: 2016-12-03T10:15:40Z Example 2Output:
Next TopicJava-instant-atoffset-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