提交 63d90dda 编写于 作者: H henryjen

8023997: j.l.String.join(java.lang.CharSequence, java.lang.Iterable) sample...

8023997: j.l.String.join(java.lang.CharSequence, java.lang.Iterable) sample doesn't compile and is incorrect
Reviewed-by: alanb
上级 fc0461dc
......@@ -2457,8 +2457,8 @@ public final class String
* 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"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册