MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / main

Method main

patterns/SingletonPattern.java:31–40  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

29 r.set(val);
30 }
31 public static void main(String[] args) {
32 System.out.println("Inside main()");
33 Resource<Integer> ir =
34 IntegerSingleton.instance();
35 Resource<Integer> ir2 =
36 IntegerSingleton.instance();
37 show(ir);
38 put(ir2, Integer.valueOf(9));
39 show(ir);
40 }
41}
42/* Output:
43Inside main()

Callers

nothing calls this directly

Calls 3

instanceMethod · 0.95
showMethod · 0.95
putMethod · 0.95

Tested by

no test coverage detected