Java Date toInstant() MethodThe toInstant() method of Java Date class converts this date object into an Instant, and it returns an instant representing the same point on the tim-line as the date object. Syntax:ParametersNA ReturnIt returns an instant representing the same point on time-line as the date object. ExampleTest it NowOutput: date in Instant : 2018-09-25T04:48:26.617Z Next TopicJava Util Date |
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