Core Java Interview Questions 1 What is the difference between an Abstract class and Interface?


) What is singleton class?where is it used?



Download 126,65 Kb.
Pdf ko'rish
bet9/55
Sana01.02.2022
Hajmi126,65 Kb.
#421305
1   ...   5   6   7   8   9   10   11   12   ...   55
Bog'liq
core java interview ques

11) What is singleton class?where is it used?
Singleton is a design pattern meant to provide one and only one instance of an object.
Other objects can get a reference to this instance through a static method (class constructor
is kept private). Why do we need one? Sometimes it is necessary, and often sufficient, to
create a single instance of a given class. This has advantages in memory management, and
for Java, in garbage collection. Moreover, restricting the number of instances may be
necessary or desirable for technological or business reasons--for example, we may only
want a single instance of a pool of database connections.



Download 126,65 Kb.

Do'stlaringiz bilan baham:
1   ...   5   6   7   8   9   10   11   12   ...   55




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish