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
|