Skip to content

Commit 6fbf88c

Browse files
author
astrotycoon
committed
update
1 parent 98c3f5a commit 6fbf88c

10 files changed

Lines changed: 34 additions & 4 deletions

File tree

array/Arr/Arr.class

-34 Bytes
Binary file not shown.

array/Arr/Arr.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ public static void main(String args[]) {
1717
a = b;
1818
System.out.println("数组a的元素个数 = "+ a.length);
1919
System.out.println("数组b的元素个数 = "+ b.length);
20-
2120
System.out.println("a == b的结果是"+ (a == b));
22-
System.out.println("a[0] ="+ a[0] + ",a[1] ="+ a[1]+ ",a[2] ="+ a[2]);
23-
System.out.println("b[0] ="+ b[0] + ",b[1] ="+ b[1] +",b[2] ="+ b[2]);
21+
System.out.println("a[0] = "+ a[0] +",a[1] = "+ a[1] +",a[2] = "+ a[2]);
22+
System.out.println("b[0] = "+ b[0] +",b[1] = "+ b[1] +",b[2] = "+ b[2]);
2423

2524
System.out.println("b == c的结果是"+ (b == c));
2625
b = c;
@@ -30,7 +29,7 @@ public static void main(String args[]) {
3029
System.out.println("c[0] = "+ c[0] +",c[1] = "+ c[1] +",c[2] = "+ c[2]);
3130

3231
System.out.println(d);
33-
System.out.println("数组d的引用"+a);
32+
System.out.println("数组d的引用"+d);
3433
System.out.println("数组d的元素个数 = "+ d.length);
3534
}
3635
}
12 KB
Binary file not shown.

enum/season/Enum.class

559 Bytes
Binary file not shown.

enum/season/Enum.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
enum Season {
2+
Spring, Summer, Autumn, Winter
3+
}
4+
5+
public class Enum {
6+
public static void main(String args[]) {
7+
Season x = Season.Spring;
8+
System.out.println(x);
9+
10+
x = Season.Summer;
11+
System.out.println(x);
12+
13+
x = Season.Autumn;
14+
System.out.println(x);
15+
16+
x = Season.Winter;
17+
System.out.println(x);
18+
}
19+
}

enum/season/Season.class

858 Bytes
Binary file not shown.

enum/weekday/rest.class

564 Bytes
Binary file not shown.

enum/weekday/rest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
public class rest {
2+
public static void main(String args[]) {
3+
weekday x = weekday.星期日;
4+
if (x == weekday.星期日) {
5+
System.out.println(x);
6+
System.out.println("今天我休息!");
7+
}
8+
}
9+
}

enum/weekday/weekday.class

1.01 KB
Binary file not shown.

enum/weekday/weekday.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
public enum weekday {
2+
星期一, 星期二, 星期三, 星期四, 星期五, 星期六, 星期日
3+
}

0 commit comments

Comments
 (0)