Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2275e03

Browse files
Add missing test file (#16)
1 parent 5d69f8f commit 2275e03

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

‎tests/Array.java‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
public class Array {
2+
static int iarr[] = new int[5];
3+
static long larr[][] = new long[2][3];
4+
static ArrayA rarr[][][] = new ArrayA[4][2][3];
5+
public static void main(String[] args) {
6+
/* test default value */
7+
System.out.println(iarr[0]);
8+
System.out.println(larr[1][2]);
9+
System.out.println(rarr[2][1][1]);
10+
11+
iarr[2] = 3;
12+
larr[0][1] = 5;
13+
rarr[1][1][1] = new ArrayA();
14+
System.out.println(iarr[2]);
15+
System.out.println(larr[0][1]);
16+
System.out.println(rarr[1][1][1].x);
17+
}
18+
}
19+
20+
class ArrayA {
21+
int x = 5;
22+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /