repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge from mainline (gomp-merge-2005-02-26).
[official-gcc.git]
/
libjava
/
testsuite
/
libjava.lang
/
StaticConstructor.java
blob
54c0f5376df3051c4b078aae5d516a10111f4b99
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