Can we have this pattern implemented using static class?
Answer / Sanjay Sharma
Yes, Singleton can be implemented using a static class in Java. However, it's not recommended because static methods are thread-safe by default and don't provide the ability to lazily initialize or perform double-checked locking.
| Is This Answer Correct ? | 0 Yes | 0 No |
What are useful tools for developing and testing color schemes for web sites?
What are the categories in which the design patterns can be divided?
4. Identify and bound the SOI’s Operating Environment.
What is the difference between proxy and adapter?
. How can a product be accessible to differently-abled people?
What is the singleton design pattern?
What is the publish/subscribe model?
What are structural design patterns?
How can we design/implement singleton object?
write 5 best test cases like any password?password should be mixed case with atlest one number or special characters?
What is design pattern ?
In what cases are synchronous architectures more appropriate than asynchronous architectures?