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


// 40002 exceeds the 16-bit limit of a short



Download 17,18 Mb.
Pdf ko'rish
bet88/90
Sana22.06.2022
Hajmi17,18 Mb.
#693704
1   ...   82   83   84   85   86   87   88   89   90
Bog'liq
(Head Up) Kathy Sierra Bert Bates - Head First Java, 3rd Edition Early Release-O\'Reilly Media, Inc. (2021)

// 40002 exceeds the 16-bit limit of a short
short x = (short) y; // x now equals -25534!
Still, the point is that the compiler lets you do it. And let’s say you have a
floating point number, and you just want to get at the whole number (
int
)
part of it:
float f = 3.14f;
int x = (int) f; // x will equal 3
And don’t even 
think
about casting anything to a boolean or vice versa—
just walk away.
*It involves sign bits, binary, ‘two’s complement’ and other geekery, all of
which are discussed at the beginning of appendix B.


BE the JVM
The Java file on this page represents a complete source file. Your job is
to play JVM and determine what would be the output when the
program runs?



Code Magnets
A working Java program is all scrambled up on the fridge. Can you
reconstruct the code snippets to make a working Java program that
produces the output listed below? Some of the curly braces fell on the floor
and they were too small to pick up, so feel free to add as many of those as
you need!



Across
1. Fancy computer word for build
4. Multi-part loop
6. Test first
7. 32 bits


10. Method’s answer
11. Prepcode-esque
13. Change
15. The big toolkit
17. An array unit
18. Instance or local
20. Automatic toolkit
22. Looks like a primitive, but..
25. Un-castable
26. Math method
28. Converter method
29. Leave early
Down
2. Increment type
3. Class’s workhorse
5. Pre is a type of _____
6. For’s iteration ______
7. Establish first value
8. While or For
9. Update an instance variable
12. Towards blastoff
14. A cycle
16. Talkative package
19. Method messenger (abbrev.)


21. As if
23. Add after
24. Pi house
26. Compile it and ____
27. ++ quantity

Download 17,18 Mb.

Do'stlaringiz bilan baham:
1   ...   82   83   84   85   86   87   88   89   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