Duplicate :
|
|
Duplicate :
|
A DESCRIPTION OF THE PROBLEM : In the javadoc for the class java.time.format.DateTimeFormatter, the example that reads: String text = date.toString(formatter); should read: String text = date.format(formatter); EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - String text = date.format(formatter); ACTUAL - String text = date.toString(formatter); URL OF FAULTY DOCUMENTATION : https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html