Core Java® Volume I–Fundamentals


Chapter 5: Inheritance



Download 37,53 Mb.
Pdf ko'rish
bet6/34
Sana06.01.2022
Hajmi37,53 Mb.
#325163
1   2   3   4   5   6   7   8   9   ...   34
Bog'liq
9780134177373-Vol-1

203

Chapter 5: Inheritance ................................................................................

204


Classes, Superclasses, and Subclasses ..................................................

5.1


204

Defining Subclasses ...................................................................

5.1.1

206


Overriding Methods .................................................................

5.1.2


207

Subclass Constructors ...............................................................

5.1.3

212


Inheritance Hierarchies ............................................................

5.1.4


213

Polymorphism ............................................................................

5.1.5

214


Understanding Method Calls ..................................................

5.1.6


217

Preventing Inheritance: Final Classes and Methods ............

5.1.7

219


Casting ........................................................................................

5.1.8


221

Abstract Classes .........................................................................

5.1.9

227


Protected Access ........................................................................

5.1.10


228

Object


: The Cosmic Superclass .................................................................

5.2


229

The 


equals

 Method ......................................................................

5.2.1

231


Equality Testing and Inheritance .............................................

5.2.2


235

The 


hashCode

 Method ....................................................................

5.2.3

238


The 

toString


 Method ....................................................................

5.2.4


244

Generic Array Lists ..................................................................................

5.3

247


Accessing Array List Elements ................................................

5.3.1


251

Compatibility between Typed and Raw Array Lists ............

5.3.2

252


Object Wrappers and Autoboxing .........................................................

5.4


256

Methods with a Variable Number of Parameters ................................

5.5

258


Enumeration Classes ...............................................................................

5.6


260

Reflection ..................................................................................................

5.7

261


The 

Class


 Class ............................................................................

5.7.1


263

A Primer on Catching Exceptions ...........................................

5.7.2

265


Using Reflection to Analyze the Capabilities of Classes ......

5.7.3


271

Using Reflection to Analyze Objects at Runtime ..................

5.7.4

276


Using Reflection to Write Generic Array Code .....................

5.7.5


279

Invoking Arbitrary Methods ...................................................

5.7.6

283


Design Hints for Inheritance ..................................................................

5.8



Download 37,53 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9   ...   34




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