Microsoft
Software
Hardware
Network
Question : Java multi thread singleton
This questions is for my own future referece, please feel to comment.
Some experts suggests following thread safe singleton pattern.
public class Test {
public static getInstance(){
return SingleTest.test ;
}
private static class SingleTest{
public static Test test = new Test() ;
}
}
I have even simpler:
public class Test{
private static Test instance = new Test();
public static Test getInstance(){
return instance;
}
}
Am I right?
Answer : Java multi thread singleton
the only diff is that the later doesn't do lazy loading!
Random Solutions
Programmatically get bookmarks from PDF file
Print Management Export issue srv 2008
Best practices in building test harness
Select statement with Datepart failing
Shadowing/Overriding in C#
Invalid object reference error
SSH console: go to specified folder after login
Access VBA to stop all macros
EtherChannel on Cisco 2960 switch intermittent dropped packet
subquery returned more than 1 value: database vendor code 512