OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
2005-12-22 Andrew Haley <aph@redhat.com>
[pf3gnuchains/gcc-fork.git]
/
libjava
/
testsuite
/
libjava.lang
/
StaticConstructor.java
1
// Test to make sure static initializers are called
2
3
class bar
4
{
5
public static int zog;
6
public static int zag;
7
8
static
9
{
10
zog = 12;
11
zag = 2;
12
}
13
14
public bar() { }
15
}
16
17
public class StaticConstructor
18
{
19
static int foo ()
20
{
21
return new bar().zog;
22
}
23
24
public static void main(String args[])
25
{
26
System.out.println ("" + (foo() + bar.zag));
27
}
28
}
29