lingcoder / onjava8 Goto Github PK
View Code? Open in Web Editor NEW《On Java 8》中文版
License: MIT License
《On Java 8》中文版
License: MIT License
章节末尾倒数第二段:“尽管 Implementation2 中定义 newMethod(),但是可以使用 newMethod() 了。”
应改为:“尽管 Implementation2 中未定义 newMethod(),但是可以使用 newMethod() 了。”
第十章 接口
附录:数据压缩
最后一行“个中原因将在以后的章节里解释。”
修改为“各种原因将在以后的章节里解释。”
有没有主动请战的勇士哈?
第五章标题
第三章 万物皆对象
基本类型的存储 int型和long型最大值应为 + 2xx -1
基本类型 | 大小 | 最小值 | 最大值 | 包装类型 |
---|---|---|---|---|
int | 32 bits | - 231 | + 231 -1 | Integer |
long | 64 bits | - 263 | + 263 -1 | Long |
(int最大值应为+231-1)
(long最大值应为+263-1)
// interfaces/RandomStrings.java
// Implementing an interface to conform to a method
import java.nio.*;
import java.util.*;
public class RandomStrings implements Readable {
private statdic Random rand = new Random(47);
private static final char[] CAPITALS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".toCharArray();
private static final char[] LOWERS = "abcdefghijklmnopqrstuvwxyz".toCharArray();
private static final char[] VOWELS = "aeiou".toCharArray();
private int count;
……
其中statdic
应为static
第18章String的start()和end()章节的事例代码
static void examine(String s, String regex) {
Display d = new Display(regex);
Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(s);
while(m.find())
d.display("find() '" + m.group() +
"' start = "+ m.start() + " end = " + m.end());
if(m.lookingAt()) // No reset() necessary
d.display("lookingAt() start = "
+ m.start() + " end = " + m.end());
if(m.matches()) // No reset() necessary
d.display("matches() start = "
+ m.start() + " end = " + m.end());
} 两个if是不是不用缩进
加油~~~
class StaticTest {
static int i = 47;
}
StaticTest st2 = new StaticTest();
引用静态变量有两种方法。在前面的示例中,我们通过一个对象来去定位它,例如 st2.i。我们也可以通过类名直接引用它
静态变量和静态方法,还可以通过对象引用直接调用吗 ?这个确定是这样吗?🤔🤔
第二十章泛型
例如:目录上写着"内部类应用场景",但是内容却没有此标题
其中 ***** 未添加转义符。显式也为*****。可能需要修改为*****。
同样的问题再 童一章的冲突小节也存在
第一张继承部分有”基础类“、”基类“、”基本类型“和”基类型“,感觉初学者容易混淆,建议统一称谓,不知妥否。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.