— Scott McNealy, Sun Microsystems Chairman, President and ceo


yes 6. Must the class of the objects stored in  myArrayList implement  Comparable ? no



Download 40,57 Mb.
Pdf ko'rish
bet534/555
Sana26.05.2022
Hajmi40,57 Mb.
#609235
1   ...   530   531   532   533   534   535   536   537   ...   555
Bog'liq
Head First Java (Kathy Sierra, Bert Bates) (z-lib.org)

yes
6. Must the class of the objects stored in 
myArrayList
implement 
Comparable
?
no
7. Must the class of the objects stored in 
myArrayList
implement 
Comparator
?
no
8. What must the class of the 
myCompare
object implement?
Comparator
9. What method must the class of the 
myCompare
object implement? 
compare( )
Exercise Solution
Possible Answers:
Comparator,
Comparable,
compareTo( ),
compare( ),
yes,
no
fill-in-the-blank 
solution


collections 
with 
generics
you are here
4
579
BE the compiler solution

ArrayList dogs1 = new ArrayList();


ArrayList animals1 = new ArrayList();


 

List list = new ArrayList();

ArrayList dogs = new ArrayList();

ArrayList animals = dogs;

List dogList = dogs;

ArrayList objects = new ArrayList();

List objList = objects;

ArrayList objs = new ArrayList();
 
Compiles?



this is a new chapter
581
Make it Stick
It’s time to let go. 
You wrote your code. You tested your code. You refined your code. 
You told everyone you know that if you never saw a line of code again, that’d be fine. But in the 
end, you’ve created a work of art. The thing actually runs! But now what? How do you give it to 
end users? What exactly do you give to end users? What if you don’t even know who your end 
users are? In these final two chapters, we’ll explore how to organize, package, and deploy your 
Java code. We’ll look at local, semi-local, and remote deployment options including executable 
jars, Java Web Start, RMI, and Servlets. In this chapter, we’ll spend most of our time on organizing 
and packaging your code—things you’ll need to know regardless of your ultimate deployment 
choice. In the final chapter, we’ll finish with one of the coolest things you can do in Java. Relax. 
Releasing your code is not saying goodbye. There’s always maintenance...
Release Your Code

Download 40,57 Mb.

Do'stlaringiz bilan baham:
1   ...   530   531   532   533   534   535   536   537   ...   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