A DESCRIPTION OF THE PROBLEM :
In the link https://docs.oracle.com/javase/tutorial/datetime/iso/instant.html, there's the following example:
Instant oneHourLater = Instant.now().plusHours(1);
The same page says (on the top): "The Java Tutorials have been written for JDK 8."
But in JDK 8, the java.time.Instant class doesn't have the plusHours method.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Instant oneHourLater = Instant.now().plus(1, ChronoUnit.HOURS);
ACTUAL -
Instant oneHourLater = Instant.now().plusHours(1);
URL OF FAULTY DOCUMENTATION :
https://docs.oracle.com/javase/tutorial/datetime/iso/instant.html
In the link https://docs.oracle.com/javase/tutorial/datetime/iso/instant.html, there's the following example:
Instant oneHourLater = Instant.now().plusHours(1);
The same page says (on the top): "The Java Tutorials have been written for JDK 8."
But in JDK 8, the java.time.Instant class doesn't have the plusHours method.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Instant oneHourLater = Instant.now().plus(1, ChronoUnit.HOURS);
ACTUAL -
Instant oneHourLater = Instant.now().plusHours(1);
URL OF FAULTY DOCUMENTATION :
https://docs.oracle.com/javase/tutorial/datetime/iso/instant.html