From 03afe1ec52e6795ce1efd3d3c36adb221a6cbdfa Mon Sep 17 00:00:00 2001 From: XuYanxin Date: Fri, 13 Mar 2020 16:19:45 +0800 Subject: [PATCH] fix example code (#403) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 忽路->忽略 * 修复跳转链接错误 * fix Class.getInterface() -> Class.getInterfaces() * 否者 -> 否则 * 编译期 -> 编译器 ,原文"the compiler will only allow you to say that the superclass reference is “some class that is a superclass of FancyToy” a" * ierator -> iterator * nextint -> nextInt * fix 这句翻译第一反应没太看懂,结合原文和下面的例子优化了一下翻译 * fix ojb -> obj * fix example code --- docs/book/20-Generics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/book/20-Generics.md b/docs/book/20-Generics.md index 6b0c051..e78ed13 100644 --- a/docs/book/20-Generics.md +++ b/docs/book/20-Generics.md @@ -1595,7 +1595,7 @@ import java.util.function.*; import onjava.*; public class FilledList extends ArrayList { - FilledList gen, int size) { + FilledList(Supplier gen, int size) { Suppliers.fill(this, gen, size); }