Java – Singleton Desing Pattern
public class UserKatalog { private static UserKatalog instance; private static Object lock=new Object(); private UserKatalog() { System.out.println("UserKatalog singleton nesnesi olusturuldu");…
public class UserKatalog { private static UserKatalog instance; private static Object lock=new Object(); private UserKatalog() { System.out.println("UserKatalog singleton nesnesi olusturuldu");…
public class Application { public static void main(String[] args) { Hesap h=HesapFactory.hesapOlustur("Vadeli Hesap"); System.out.println(h.getHesapTip()); h=HesapFactory.hesapOlustur("Vadesiz Hesap"); System.out.println(h.getHesapTip()); h=HesapFactory.hesapOlustur("Yatırım Hesabı"); System.out.println(h.getHesapTip());…