一、目录:
二、 第八章知识总结:常用实用类
public int length()
public boolean equals(String s)
public boolean startsWith(String s)
public boolean endsWith(String s)
public int compareTo(String s)
public boolean contains(String s)
public int indexOf(String s)
public int lastIndexOf(String s)
public String substring(int startpoint)
public String trim()
String s = new String("we are students");
length
,equals
,startsWith
,compareTo
,contains
,substring
append
,charAt
,serCharAt
,insert
,reverse
,delete
,replace
Date
类和Calendar
类。BigInteger
类。String
类的static
方法format
。char a[] = {'J','a','v','a'};
String s = new String(a);
创建对象:
public static Class forName(String className) throws ClassNotFoundException
对象调用:
public Object newInstance() throws InstantiationException,IllegalAccessException
创建对象:
Console cons = System.console();
读取文本且不回显:char[] passwd = cons.readPassword();
Pattern pattern = Pattern.compile(regex);
Macher matcher = pattern.matcher(input);
三、上周错题总结:
- 解析:选A,B,D,ByteArrayOutputStream(int size)缓冲区默认大小由size指定
B项:在try中创建输入流,在catch中检测并处理这个异常。C项:返回-1。D项:则此方法阻塞。
四、代码托管:
https://gitee.com/sgm5/text1/blob/a25b3a7c6dabad878b29febac36845bb191cd7e6/ch8.zip
五、感想:
在这周的学习中,能够进一步体会教材程序的编译运行等操作,感触颇多,对之前学习的知识有了一定的巩固,也加深了对一些知识的印象。这周除了学习教材中的知识内容,还做了小组结对作业——四则运算第二周,学习JAVA的内容比之前的多,但之前的一些知识还是没有完全记住,不扎实。
六、学习进度条
周数 | 代码行数(新增/累积) | 博客量(新增/累积) | 学习时间(新增/累积) | 重要成长 |
---|---|---|---|---|
目标 | 5000行 | 30篇 | 400小时 | |
第七周 | 938/3320 | 2/8 | 10/50 |
原文:https://www.cnblogs.com/sgm5/p/10704787.html