Lecturer: Djurayev Oybek Nuruddinovich



Download 285,5 Kb.
bet3/4
Sana19.07.2021
Hajmi285,5 Kb.
#123397
1   2   3   4
Bog'liq
Lecture 1 (1)

Threads in OS
  • Life cycle of a Thread (Thread States)
  • How to create thread
  • There are two ways to create a thread:
  • By extending Thread class
  • By implementing Runnable interface.
  • Commonly used Constructors of Thread class
  • Thread class provide constructors and methods to create and perform operations on a thread. Thread class extends Object class and implements Runnable interface.
  • - Thread()
  • - Thread(String name)
  • - Thread(Runnable r)
  • - Thread(Runnable r, String name)
  • Constructors of Thread class
  • Thread firstThread = new Thread();
  • Thread secondThread = new Thread("namedThread");
  • System.out.println(firstThread.getName());
  • System.out.println(secondThread.getName());
  • RESULT:
  • Thread-0
  • namedThread
  • Fragment:
1   2   3   4




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