java.time.Instant.plus(TemporalAmount amountToAdd)


java.time.Instant.plus(TemporalAmount amountToAdd)

package com.codingdict;

import java.time.Instant;
import java.time.Duration;

public class InstantDemo {
   public static void main(String[] args) {

      Instant instant = Instant.parse("2017-02-03T10:37:30.00Z");
      Duration duration = Duration.ofHours(5);
      Instant result = instant.plus(duration);
      System.out.println(result);  
   }
}