Head First Java a brain-Friendly Guide Kathy Sierra and Bert Bates


may use the same snippet more than once, and you won’t need to use all the snippets. Your  goal



Download 17,18 Mb.
Pdf ko'rish
bet33/90
Sana22.06.2022
Hajmi17,18 Mb.
#693704
1   ...   29   30   31   32   33   34   35   36   ...   90
Bog'liq
(Head Up) Kathy Sierra Bert Bates - Head First Java, 3rd Edition Early Release-O\'Reilly Media, Inc. (2021)

may
use the same snippet more than once, and
you won’t need to use all the snippets. Your 
goal
is to make classes that will
compile and run and produce the output listed. Some of the exercises and
puzzles in this book might have more than one correct answer. If you find
another correct answer, give yourself bonus points!
Output
Bonus Question !
If the last line of output was 
24
instead of 
10
how would you complete the
puzzle ?


public class EchoTestDrive { 
public static void main(String [] args) { 
Echo e1 = new Echo(); 
_________________________ 
int x = 0; 
while ( ___________ ) { 
e1.hello(); 
__________________________ 
if ( ____________ ) { 
e2.count = e2.count + 1; 

if ( ____________ ) { 
e2.count = e2.count + e1.count; 

x = x + 1; 

System.out.println(e2.count); 

}
class ____________ { 
int _________ = 0; 
void ___________ { 
System.out.println(“helloooo... “); 

}
Note
Each snippet from the pool can be used more than once!


A bunch of Java components, in full costume, are playing a party game,
“Who am I?” They give you a clue, and you try to guess who they are,
based on what they say. Assume they always tell the truth about themselves.
If they happen to say something that could be true for more than one of
them, choose all for whom that sentence can apply. Fill in the blanks next to
the sentence with the names of one or more attendees. The first one’s on us.




Download 17,18 Mb.

Do'stlaringiz bilan baham:
1   ...   29   30   31   32   33   34   35   36   ...   90




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