Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- *
- * @author Kamil
- * Implementacja wzorca projektowego Singleton w języku JAVA
- */
- public class Singleton {
- private static class SingletonHolder{
- public static final Singleton instance = new Singleton();
- }
- private Singleton(){
- }
- public static Singleton getInstance(){
- return SingletonHolder.instance;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement