forked from hellokaton/write-readable-code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExample1.java
More file actions
39 lines (32 loc) · 761 Bytes
/
Copy pathExample1.java
File metadata and controls
39 lines (32 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package chapter_08;
/**
* 条件语句中参数的顺序
*
* @author biezhi
* @date 2018/7/11
*/
public class Example1 {
int length = 2018;
long bytesReceived;
long bytesExpected;
public void part1() {
if (length >= 2000) {
System.out.println("你是一个现代程序员");
}
}
public void part2() {
if (2000 <= length) {
System.out.println("你是一个现代程序员??");
}
}
public void part3() {
while (bytesReceived < bytesExpected) {
System.out.println("请继续接收");
}
}
public void part4() {
while (bytesExpected > bytesReceived) {
System.out.println("请继续接收");
}
}
}