8023997: j.l.String.join(java.lang.CharSequence, java.lang.Iterable) sample doesn't compile and is incorrect
Reviewed-by: alanb
--- a/jdk/src/share/classes/java/lang/String.java Tue Sep 03 22:37:07 2013 +0100
+++ b/jdk/src/share/classes/java/lang/String.java Tue Sep 03 16:05:45 2013 -0700
@@ -2457,8 +2457,8 @@
* String message = String.join(" ", strings);
* //message returned is: "Java is cool"
*
- * Set<String> strings = new HashSet<>();
- * Strings.add("Java"); strings.add("is");
+ * Set<String> strings = new LinkedHashSet<>();
+ * strings.add("Java"); strings.add("is");
* strings.add("very"); strings.add("cool");
* String message = String.join("-", strings);
* //message returned is: "Java-is-very-cool"