Skip to content

Commit 0decdc1

Browse files
committed
2019年5月23日 16:49:00
1 parent 5af6d8d commit 0decdc1

File tree

20 files changed

+196
-8
lines changed

20 files changed

+196
-8
lines changed

lib/commons-codec-1.10.jar

278 KB
Binary file not shown.

lib/commons-logging-1.2.jar

60.4 KB
Binary file not shown.

lib/httpclient-4.5.6.jar

749 KB
Binary file not shown.

lib/httpcore-4.4.10.jar

319 KB
Binary file not shown.

lib/jsoup-1.11.3.jar

386 KB
Binary file not shown.

master.txt

Whitespace-only changes.

out/production/Java/.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ hs_err_pid*
3131
.idea/modules.xml
3232
.idea/project-template.xml
3333
.idea/workspace.xml
34-
company\
35-
src\
34+
35+

sourse/Java.WK3

0 Bytes
Binary file not shown.

src/Game/Frame.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package src.Game;
2+
3+
import java.awt.*;
4+
import java.awt.event.WindowAdapter;
5+
import java.awt.event.WindowEvent;
6+
7+
public class Frame extends java.awt.Frame {
8+
/**
9+
* 加载窗口
10+
*/
11+
public void LauntchFrame(){
12+
setSize(300,300);
13+
setLocation(100,100);
14+
setVisible(true);
15+
addWindowListener(new WindowAdapter() {
16+
@Override
17+
public void windowClosing(WindowEvent e) {
18+
System.exit(0);
19+
}
20+
});
21+
}
22+
23+
public static void main(String[] args) {
24+
Frame my = new Frame();
25+
my.LauntchFrame();
26+
}
27+
}

src/MySingleList/singleList.java

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ public void insertTail(T value) {
3939
*/
4040

4141
public void show() {
42-
// Entry<T> P = head;
42+
// Entry<T> P = head;
4343
//
4444
// while (P.getNext() != null) {
4545
// System.out.println(P.getValue() + " ");
4646
// P = P.getNext();
4747
// }
48-
// System.out.println(P.getValue() + " ");
48+
// System.out.println(P.getValue() + " ");
4949
for (Entry<T> P = head; P != null; P = P.getNext()) {
5050
if (P == head) {
5151
} else
@@ -115,6 +115,24 @@ public void remove(T value) {
115115

116116
}
117117

118+
/**
119+
* 单链表的逆置
120+
*/
121+
public void reverse() {
122+
if (head.getNext() == null)
123+
return;
124+
Entry<T> P = head.getNext().getNext();
125+
head.getNext().setNext(null);
126+
Entry<T> S = null;
127+
while (P != null) {
128+
S = P.getNext();
129+
P.setNext(head.getNext());
130+
head.setNext(P);
131+
P = S;
132+
}
133+
134+
}
135+
118136
public static void main(String[] args) {
119137

120138
singleList<Integer> list = new singleList<>();

0 commit comments

Comments
 (0)