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
Is it possible to mirror two physical disks?
PaperPort 12
Windows 2008 - HP LaserJet 2600n drivers aren't working
My Computer prints Very Tiny on Fresh Install
Domain rename prior to consolidation
iPhone 4 xcode "Line Drawing app"
MS SQL Stored Procedure miscounting number of characters
Cannot connect to Watchguard Firebox X15 Edge after factory reset
lpr print server issue
How do I connect to a Windows VPN server through a Cisco ASA 5505?