Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit db3edb1

Browse files
committed
第三轮复习
1 parent f0eac89 commit db3edb1

File tree

13 files changed

+142
-3
lines changed

13 files changed

+142
-3
lines changed
-242 Bytes
Binary file not shown.
997 Bytes
Binary file not shown.
857 Bytes
Binary file not shown.
917 Bytes
Binary file not shown.
1.05 KB
Binary file not shown.
1.26 KB
Binary file not shown.
821 Bytes
Binary file not shown.

src/main/java/com/zetian/study/collection/iterator/IteratorDemo.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ public static void main(String[] args) {
2525
method();
2626
//创建集合对象
2727
List<String> c = new ArrayList<String>();
28-
List<String> linkedList = new LinkedList<>();
29-
Set<String> stringSet = new HashSet<>();
30-
3128
//添加元素
3229
c.add("hello");
3330
c.add("world");
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package com.zetian.threetimereview;
2+
3+
4+
/**
5+
* Description
6+
* 计算十个人排序,
7+
*
8+
* @author Zetian Wang
9+
* @date 2019/12/09
10+
**/
11+
public class Factorials {
12+
public static void main(String[] args) {
13+
factorial(10);
14+
}
15+
16+
public static int factorial(int n) {
17+
if (n == 0) {
18+
System.out.println(n + "! = 0");
19+
return 1;
20+
} else {
21+
System.out.println(n);
22+
int temp = n * factorial(n - 1);
23+
System.out.println(temp);
24+
return temp;
25+
}
26+
}
27+
}
28+
29+
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package com.zetian.threetimereview;
2+
3+
/**
4+
* Description
5+
*
6+
* @author Zetian Wang
7+
* @date 2019/12/14
8+
**/
9+
public class Father {
10+
public void driver() {
11+
System.out.println("快车");
12+
}
13+
14+
protected void eat(String drink) {
15+
driver();
16+
System.out.println(drink);
17+
}
18+
19+
class Son extends Father {
20+
@Override
21+
protected void eat(String drink) {
22+
System.out.println("juice");
23+
}
24+
25+
@Override
26+
public void driver() {
27+
eat("water");
28+
System.out.println("慢车");
29+
}
30+
}
31+
32+
public static void main(String[] args) {
33+
Father father = new Father();
34+
father.eat("hotwater");
35+
}
36+
}
37+

0 commit comments

Comments
 (0)