— Scott McNealy, Sun Microsystems Chairman, President and ceo



Download 40,57 Mb.
Pdf ko'rish
bet488/555
Sana26.05.2022
Hajmi40,57 Mb.
#609235
1   ...   484   485   486   487   488   489   490   491   ...   555
Bog'liq
Head First Java (Kathy Sierra, Bert Bates) (z-lib.org)

Near-miss at the Airlock


528
 
chapter 15
What did Sarah know?
Sarah realized that in order to ensure that the entire exit 
sequence would run without interruption the 
orbiterAirlockExitSequence
( ) method needed to 
be synchronized. As the design stood, it would be possible 
for a returning spacewalker to interrupt the Exit Sequence!
The Exit Sequence thread couldn’t be interrupted in the 
middle of any of the lower level method calls, but it could be 
interrupted in 
between those calls. Sarah knew that the entire 
sequence should be run as one atomic unit, and if the 
orbit
erAirlockExitSequence( )
method was synchronized, it 
could not be interrupted at any point.
puzzle 
answers


this is a new chapter
529
Make it Stick
Sorting is a snap in Java. 
You have all the tools for collecting and manipulating 
your data without having to write your own sort algorithms (unless you’re reading this right 
now sitting in your Computer Science 101 class, in which case, trust us—you are SO going to be 
writing sort code while the rest of us just call a method in the Java API). The Java Collections 
Framework has a data structure that should work for virtually anything you’ll ever need to do. 
Want to keep a list that you can easily keep adding to? Want to find something by name? Want 
to create a list that automatically takes out all the duplicates? Sort your co-workers by the 
number of times they’ve stabbed you in the back? Sort your pets by number of tricks learned? 
It’s all here...
Data
structures
16

collections 

Download 40,57 Mb.

Do'stlaringiz bilan baham:
1   ...   484   485   486   487   488   489   490   491   ...   555




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