Skip to content

Commit b717533

Browse files
committed
复习
1 parent e28d1b6 commit b717533

File tree

4 files changed

+259
-0
lines changed

4 files changed

+259
-0
lines changed

复习/day01review.txt

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
1�����������
2+
�������չ
3+
�����Ӳ��
4+
���������
5+
���������
6+
java���ԣ���ƽ̨�ԣ���ȫ��
7+
James Gosling:java֮��
8+
9+
2�����ÿ���̨����
10+
�̷� ð�� �س������뵽ij������
11+
cd ����Ŀ¼
12+
cd �༶Ŀ¼
13+
dir ��ʾĿ¼�µ������ļ�
14+
md ����Ŀ¼
15+
rd ɾ��Ŀ¼
16+
cls ����
17+
exit �˳�
18+
���䣺rd -sɾ����ʱ��ѯ��
19+
rd -q -sֱ��ɾ����ѯ��
20+
21+
3��JVM��JRE,JDK���ߵ�����͹�ϵ
22+
JVM:java���������֤��java���ԵĿ�ƽ̨�ͣ�Ϊ��ͬ�IJ���ϵͳ�ṩ��ͬ��JVM
23+
JRE:����ʱ����������JVM�ͺ������
24+
JDK���������߰�������JRE�Ϳ�������
25+
26+
4��JDK�����أ���װ��ж��
27+
28+
5����������
29+
path��Ϊ������exe�ļ���������Ŀ¼������
30+
��ʽ��
31+
(1)�ڻ���������path������javac��java���ڵ�Ŀ¼����������ǰ�棬�ж���ᰴ˳�����
32+
(2)������������JAVA_HOMEΪexeĿ¼���ڣ�path:%JAVA_HOME%\bin;ԭ����·��
33+
34+
classpath��Ϊ����class�ļ���������ָ��Ŀ¼������
35+
36+
6��HelloWorld����
37+
38+
7��
39+
8��
40+
9��
41+
10��ע��
42+
ע�ͷ��ࣺ
43+
����ע�� //
44+
����ע�� /* */
45+
�ĵ�ע�� /** */
46+
47+
ע�͵����ã�
48+
����˵���ĵ�����ߴ���Ŀ��Ķ���
49+
�������Գ���
50+
51+
11���ؼ���
52+
java�����б����ľ������⺬��ĵ���
53+
54+
�����ؼ���
55+
56+
ע�����
57+
goto��const��java�еĹؼ��ֱ��������Dz�δʹ��
58+
59+
60+
12����ʶ��
61+
��ʶ�������ڸ��࣬�ӿڣ����������������ķ���
62+
63+
��ɹ���
64+
Ӣ�Ĵ�Сд��ĸ
65+
����
66+
_��$
67+
ע�����
68+
���������ֿ�ͷ
69+
�����ǹؼ���
70+
�ϸ����ִ�Сд
71+
72+
������������
73+
���������ļ��У����ڽ����ͬ����������
74+
ȫ��Сд
75+
76+
����߽ӿڣ�ÿһ������ĸ��д(��һ����API���ṩ�����ӿ������������淶)
77+
78+
�������߱������׸�����Сд�������д
79+
80+
��������д���������֮����_����

复习/day02review.txt

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
1:常量
2+
自定义常量:引用类型
3+
字面值常量:
4+
字符串
5+
字符
6+
整型
7+
小数:浮点型
8+
null:空常量
9+
10+
2:类型转换
11+
进制:
12+
二进制:0b
13+
八进制:0
14+
十六进制:0x
15+
16+
其他进制到十进制:
17+
系数*底数^权次方之和
18+
19+
十进制到其他进制:
20+
除基取余直到商为零,余数反转
21+
22+
8421码:快速转换
23+
24+
3:有符号数计算机表示
25+
原码:二进制表示
26+
正数:符号位0 负数:符号位1
27+
反码:正数与原码一致 负数符号位为1,其他位按位取反
28+
补码:正数与原码一致 负数由反码加1
29+
30+
31+
4:基本数据类型
32+
四类八种:
33+
byte 1
34+
short 2
35+
int 4
36+
long 8
37+
38+
boolean 1
39+
char 2
40+
float 4
41+
double 8
42+
43+
默认整型是int,浮点型是double
44+
定义long型:末尾加l或者L(推荐都用大写的)
45+
定义float型:末尾加f或者F
46+
47+
引用数据类型:
48+
数组,类,接口
49+
50+
5:变量
51+
程序执行过程值会发生变化的量
52+
53+
6:类型转换
54+
隐式类型转换
55+
byte,short,char->int->long->float->double
56+
57+
long为什么能转换成float:
58+
float底层存储结构不同
59+
表示的数据范围float更大
60+
注意事项:常量相加,先加再开空间
61+
变量相加,先开空间再加
62+
强制类型转换
63+
不建议
64+
65+
7:赋值运算符
66+
8:算术运算符
67+
+-*/% ++ --:自增自减放在前面后面的问题
68+
+= -= *= /= %=
69+
9:关系运算符
70+
>< == >= <= !=
71+
10:逻辑运算符
72+
& | ! ^
73+
&& ||:具有短路效果

复习/day03review.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1����Ŀ�����

复习/day19review.txt

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
1���쳣
2+
�쳣�������쳣�dz�����ֲ����������
3+
�೤�����г����Σ��������
4+
�쳣���ࣺ
5+
Throwable
6+
|---Error
7+
|---Exception
8+
|---RuntimeException ����ʱ�쳣 ���Դ�����Ҳ���Բ����� ��Ҫ�Ĵ���
9+
|---��RuntimeException ����ʱ�쳣 ���봦����������ͨ������
10+
11+
�쳣������ʽ��
12+
JVMĬ�ϴ����ķ�ʽ���������쳣����Ϣ�������̨������������
13+
A��try...catch...finally...
14+
���ֱ���ʹ�ã�try�����catch��finally�е�һ�����ʹ��
15+
finally���ص㣺��finally���Ƶ�����嶼��ִ��
16+
ע�����finally���Ƶ����ֻҪ��JVM�˳�֮ǰ����ִ��
17+
18+
B��throws
19+
���ܴ������쳣�����׳���һ�����main�����еõ��������main���������� ����JVM
20+
21+
�쳣��ע�����
22+
JDK7�������ԣ�
23+
catch(�쳣1 | �쳣2 |... e):����쳣
24+
try...catch���ж��catch���ʱ����Χ��������쳣����������һ��
25+
26+
�����쳣������ֻ���׳��븸����ͬ�쳣�������ڸ����쳣�����쳣
27+
����쳣������ֻ���׳��븸����ͬ�쳣�������ڸ����쳣�����쳣����
28+
û���쳣������û���׳��쳣������Ҳ�����׳��쳣
29+
30+
�Զ����쳣��
31+
����̳���RuntimeException����Exception��
32+
�������׳��Զ����쳣
33+
public class MyException extends Exception {
34+
public MyException() {
35+
super();
36+
}
37+
public MyException(String message) {
38+
super(message);//�������Ϣ�Ĺ��췽��
39+
}
40+
}
41+
42+
�����⣺final��finalize��finally������
43+
final����ʾ���յ����η�
44+
�����ࣺ�಻�ܱ��̳�
45+
���γ�Ա�������������ܱ���д
46+
���γ�Ա������������Ϊ����
47+
finalize��Object��ķ��������ڵ�������������������������System��� gc()��������һ��
48+
finally�����쳣������try...catch...finally���ʹ�ã��쳣�����ǻ�ִ�� �Ĵ���
49+
50+
throws��throw������
51+
throws�����������ϣ���������������������׳�����쳣�ö��Ÿ�������ʾ �����쳣�Ŀ�����
52+
throw����������󣬺��������ֻ��һ�����󣬱�ʾ����ij�־�����쳣
53+
54+
finally�е�������return֮ǰ����֮��ִ��
55+
return�����ص㣬����һ������·��
56+
57+
2��File��
58+
���������ڱ�ʾ�ļ������ļ��е���
59+
60+
���췽����
61+
public File(String pathname)
62+
public File(String parent,String filename)
63+
public File(File file, String name)
64+
public File(URI uri):ͳһ��Դ��λ�������Դ�ͨ������·�������ļ������ļ��ж� ��
65+
66+
��Ա������
67+
�������ܣ�
68+
public boolean createNewFile():�������ļ�
69+
public boolean mkdir():��������Ŀ¼
70+
public boolean mkdirs():�������Ŀ¼
71+
72+
ɾ�����ܣ�
73+
public boolean delete():ɾ��ִ���ļ����ļ���
74+
ɾ�����ص㣺ɾ����������վ��ֱ��ɾ��
75+
76+
�жϹ��ܣ�
77+
public boolean isDirectory():�ж��Ƿ�Ϊ�ļ���
78+
public boolean isFile():�ж��Ƿ�Ϊ�ļ�
79+
public boolean exists():�ж��Ƿ����
80+
public boolean canWrite():�Ƿ��д
81+
public boolean canRead():�Ƿ�ɶ�
82+
public boolean isHidden():�Ƿ�����
83+
���������ܣ�
84+
public boolean rename(String dest):��������·����ͬ��������·����ͬ ���к�������
85+
86+
��ȡ���ܣ�
87+
public String getAbsolutePath():
88+
public String getName():
89+
public String getPath():
90+
public int length():��ȡ�ļ���С
91+
public long lastModified():����޸�ʱ��ĺ���ֵ
92+
�߼���ȡ���ܣ�
93+
public String[] list():�ַ�����洢ij��Ŀ¼�������ļ����ļ���
94+
public File[] listFile():�ļ�����洢ij��Ŀ¼�������ļ����ļ���
95+
96+
���������
97+
public String[] list(fileNameFilter filter):
98+
public File[] listFile(fileNameFilter filter):
99+
fileNameFilter�������ڲ��࣬��дaccept����
100+
new fileNameFilter(){
101+
public boolean accept(File dir,String name){
102+
return new file().isFile() && name.endswit(".jpg");
103+
}
104+
}
105+
���������ijĿ¼������JPG��β���ļ�

0 commit comments

Comments
 (0)