0% found this document useful (0 votes)
4 views4 pages

Java Unit 2

The document discusses inheritance in programming, detailing types such as single parent and multilevel inheritance. It explains methods like overriding and dynamic method resolution, as well as the use of abstract classes and interfaces. Additionally, it covers implementing and extending interfaces, along with accessing methods within those interfaces.

Uploaded by

pruthvi07u
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views4 pages

Java Unit 2

The document discusses inheritance in programming, detailing types such as single parent and multilevel inheritance. It explains methods like overriding and dynamic method resolution, as well as the use of abstract classes and interfaces. Additionally, it covers implementing and extending interfaces, along with accessing methods within those interfaces.

Uploaded by

pruthvi07u
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

<br>

UNT T -2 Date
Page.

Inhetanc e
+he méchanism
which Class detived.
feom abQ. Se claSS
Class that detive
1S ca lled. as detived. class

Type Of inhetarnce
} Single Parent I Chilo
2) multileve l
hetachica

Method OveE udirg

AMethoa: Samehave
eano Patameteco
both Sub class and SUpe&. class

when method Callea


Pom Subclass it will
allways gefe &
+he
methoca, Subclass
<br>

DmD : Dynanic Methos. D5th


tesolves ovetisden
gunfirne -than

be
SuPRE ConsteI
Supe

2) 1o accesS baoen

Abrteost metOd
meino uithoe
<USed whgn all SubciasSae
Ccede +hei UeSion CF hat
methOa

Abteact closs

tshich
metnca
USed when Common (odesnees
Shaced amang- myltipk CosseS
<br>
a

Date

blucPgnt OF he clas
Specihesbehauioa
atecol
class
Conton cbslzact methodS
declace. kahtsis
USing keywcrd, (nteeFace '

Implemeoingnetface
intceface in plemented uSing Keywgo
implement

Acesting jmpleme integface

TImple ment.. i (nteEface .. o


class
OVCEEId ts methods
Cee ate object
USe OF thieobjcct

Estending Integface

An fteeface be ertend ed.


anothe2 inteeface by USing
extenc keyuco

Aaesing iteEface Methoc


Tnese metods athS cnetle
inteeface caule a 1
AcceSech
These Cauled
bject OF class implemens
intcEFac
<br>

Paceage @ Aceing acaageeg

|Pac Rage
Collection classes
AcRage OF
method intetfaces in a. Peper
OEdee

A Cteaing PacRage

acagepackage name
DTO dedare
Jnpcring Gackage
name clacses
impat [Link] (aRoge

LStatic
access
Static impt
Gf
membetS ( methoc Uariable
Sstie
class with Cut UsiDg ClassDame

impat Sttement
befote the pacRoge

You might also like