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
htaccess Partial Query String Rewrite
How to use multiple connection strings in .net
How do I push IE 8 through WSUS using Group polciy
KMS is activating Win7 Pro but not Win 2008 R2 Enterprise
restore from DB?
How to pass a variable into DATEADD function in SQL String
Server security analysis to determine patch level
Network Share permissions
Upcoming tsunami in November
Workstation Primary Group ID set as Domain Controller