blob: 0120971b7081e64d9d4d41fc6d0cc00da13d8fd1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
public class StaticVariableReferenced {
private static String s = "yes";
private static class ExampleHolder {
private static final Object example = getString(s);
}
public static Object getInstance() {
return ExampleHolder.example
}
private static String getString(String s) {
return new String(s);
}
}
|