Interare
interface i a type where methods are
by default abstract ond vaaiables ehe
by deloutt Statt' and fual,
Intesfore deties only abctyact methods and
final fields, This me cunt tat interfoces
do not sperlty any coe to implement,
thege ntet gr dota tields couton
only cayetants,
espons(bfliky o the
Theseore,tis the fntrface to dufine
clase that implaments 0n
ionalamt ntodion thete methods,
the tode tor
Syntox
ntusface intusfoct nont
vahiable. dacloth ation :
i mthode. declosrotion!
hete
int fore is
any valsd Jova vahiale Jugt itke clas onty
Eiample
intarace Ttem
stot'c final int code =100, d
name - "Fan
stotic finel Bhing
o void displa L)
Cveo oklect of an.
It is impozg/ble to
irdrlote,
nterce
We tar crott he fegenee vaiables
type
bdndig oteifore
The interfure from where' prop erties,
are
inherite d s called as Super interforr,
The sub intfae inhent the' prope rt'es
om supuh intsfare by usi'ng entend!
Kgsov d
terh nde exte Item1 inderfae
Ztem Somple, o;" disploy void
Herninterfore
=(00 cod int
Sample fndrlot
dkplay), vofd
Item entnds Thmi fare inter
3
="Fan"' name
lhso l000 Code int
Ttem indexfote
name intfote Qupes
nameintefart Qub name2
yhhe
namu2 body. b
namel etends ame2
ntertace
re ed
properbe ane nherited. bË classe
whose
Thshefore necel, oày to (afa a. daes
hat inwsts the g ven inhfate,
class cdastnome impements inte foeya
body o clets
Hoe the Joss cla nomeerto vd.s up ley
ond impbmu ntt ony wambu o in rfaree.
Cless cdast norme'etend gupehclass
implamunte ins<ore l, intfoe 2, -
body of clel yoe
interfoce
The class uhich i8 mplerente he
caled as dmplemntation clats
* **
T a clas$ implarmunts an tntetore tun
dass meat oveuTide ol!
the implerenation clas8
the abetraet mthods present in Supe
inderfoce le the dass must be declared.
a8 abetsoct casg
class.
supehType sub how to
achieve indhn't
Typ.
claly
class elass entyde
Intolate lais
laus a imple mñ ynts
entunde
class
nmrmbe o
for Eromple
3rite maliple nhestone
eth progam