projects
/
mate.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
static initializer: execute it when loading the class file
[mate.git]
/
tests
/
Static6.java
1
package tests;
2
3
public class Static6 {
4
public static int x;
5
public static int y;
6
7
static {
8
Static6.x = 0x11;
9
Static6.y = 0x22;
10
}
11
12
public static void main(String []args) {
13
addNumbers(); // 0x33
14
}
15
16
public static int addNumbers() {
17
return Static6.x + Static6.y;
18
}
19
}