0% found this document useful (0 votes)
15 views

Java Theory Assignment

Uploaded by

Durgesh
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)
15 views

Java Theory Assignment

Uploaded by

Durgesh
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
You are on page 1/ 13

DATE: PAGE

NO.:

tion
yAbotaction
Ho Kno
|Vo
Tbe Components
he necesáauiy Tahe uge Absksocion
Aomalloo- enjlain
deiveu the
Aame to heat is he
hou) Ruogamningn
Gndwac
s the
san Rnow to e. deie to
isxomlt hide isa
inhAeg allauaig
a he
atuackone Cakigg
Ca oCae
oohakacton eakue
Cae ted fo the
Shouo to
bo inaþlemeotaion aith
an totthhee o
the Tt and NO.:
DATE: PAGE
Knoà uACLeuae Enampie
meams only
da Cas deveu
knoL) he when
Causa the beakue
in iets he
VicD imblemata
do unckana
usetanat
ua weuking
not pat t
e
Abatact
claos
uaing Inplementaen
LDe Codefhe Gnd
þublie an Lam
matn2
elag achelue
oopsSn
publieABoHemaianud
ki
obAksackonin
he
laage
N0.:
DATE: PAGE

konulay
ig kuguamn
he
n

2yEncapaulakon
qettei o Code
CueoteCanWeEncapaulakibn
ite makejCaoAdsateg
un deueu
and
method al
publie
nly data
medicinel Heat
togethe
to ekuin
tbe V Aet
auea
al
and Hhe into 5o14 )s DATE: PAGE
NO.:
data X
a Rupi9 as wlodiusX
dotaet
He
anhyead n menheu
ou unit
icdius
Cam o}ne
PAGE NO.: PAGE NO.:
DATE:I DATE:

wlos akudent
hutuate int Rollnurnbey
14
þunutde Conkual ase te dadaSuppose
you wont fo det the volue o) ld abih e

Bhould he qsueale han


inatde be ette
ne hod you on wute he not

to sto4e he bumeuti tHe


Aeteu metbod publie int get Roll numbeu )E
ehen hig Ratloumbeu
14 isaay ko achene data bidag in Jaua
beoauAe oheu clena Loill not be able to
Qccea Hhe data thtasgb the puvale data publte uod diaplay() thig
menbRUa Aya ltrn Butihuinh Rol numbeu

2
(skum
3 Inheutance

Inhei tonce in Taua is o mechanism iswhich


Dne chject ac all he
He Ruo heu tea
and hehautgust o o þauenk abject
PAGE NO.: PAGE NO.:
DATE: DATE:

Hie an inpauiantþauta cop'k Eonple


The ideo bebind inheautonce in Jovo that publio alaos main
You Can (ueote neu0 claaa eA thak Que þublte staka uaud main (Saing asa)
built ubon exsng ClagacA
lagacA When y
Lin heit exi Hng clasa child e : new child
SS
pauent elos Mo4eoueu Cpane Aiay"
'nen methad ond Hlda in you Cutucnt " Abbi
lclaa also,

Inbeutance is a I8-A welaHoaaha þ Cchi ld Diehlay


- child
Ue la Honahp
ohy oe uae nhuitone in Jowa chttd pauent
public int
y Fau nae hod oueukiding So Auntne
Polymasuphisrm Can he acheied)
þuble wac paentDishlay ()
l2y Pau Code eauoblky
PAGE NO.:
PAGE NO.:
DATE:
DATE:

clans chld exknd fakent


bublle int Coge s Palbymomphian 18K Conaideued
Conatdeued one ol the
bublie akuin Coame eakaeo obieck- Darentd neog
Single gckon In
allon you to deline
Aydleni Qut1Awinkln CthseCoone bne inkusce ond
and baue multhle imhleHeniat
The iooud Vpaly"oeona many amd'mospha'

The i02d polymauahitm meonA


hauing Compile Hane lal<mouhham 2- It is alsa Knun
palymawshism
to be daplayea inmoNe Hho
lusahon ~vuloodig, the oveuotou

Hhe áone, Hme Con Quculeading


atuen chauackuokca iMe o.mangt Run Hne þalymoau phism tiaatso knaan an
tht som itne ieloheua huahand Gnd dyramic alymauph!sn
nd Cmplayee
PAGE NO. : PAGE NO. :
DATE:
DATE:

mehod sHeanled at ntme


Oueden wlans mne thod oue loading Ex
Th tpe Palmauphtm g acheved by
mehad ouiding Statte int addinta ,ntb) &

ay Methad auealuading
&takic int add Ginta,intb,inke)
o Method Queuloadinq is -aCompile
a Hme

Method o0euloodinq helha to incueaae. the. Jbublke Akatic ye main (skuing asug"
addait
2paamtte, n)
Ayalerna Qut paunhle (add4,)
AilkrniQuk hauinkln("add uaith
baheutoee paameku ")i
Method Muut houe deme mameond

Cxamhle a, Melhod o0euydino

Me hod oeuding ig a un Hme


ihymauhian
9
PAGE NO.: PAGE NO.:
DATE: DATE:

clas dag exkmda Animal


Mehod o9uidi is waed o gont the
L&eeite impleon omkakog D] tbe methnd
(Ceat) meihat
desedclans")

in do cloosea oib ipheulanae

MdakanAhip LelomethodoMOUAidin ex
Methd ouekiding alua ya need iobeuitance hublie Atahic tsrd main (hug iga).
Method the
mut he the Bare name ond Rome Aninal

Exanple
clana Animal Aminal aniaoal.: new Dagl

Ayatmaguk þuinkln ("eat) Memod


Ajaisan.gute fpunsla ("eski)
PAGE NO.: PAGE NO.:
DATE: DATE:

a Cona ksuthau
Cxamhle
ith Examble
publie
apes Con
Conakiuas in laug
Ahauing name
yNan pasagoeteuaedNo asumant Conskuucak aic splay
LOhen ne do nat han Ququmen n the
nome)
aa nan pauameluged. aguent
Conakactaa publie elad Hello main ()

tohen He Buagommi doeg nDt deling ain


puhlie sake uosl main (shuing
any Canahuthoy n thefaun fuagiam th
4aua Conpileu tael Cosshecto
he deol+ Cona tiutto Hello he= new Helo
ubith þuoude dalkult volues fo theabject hiedsplay;
Lihe The delault cona kauckas
Conakiucko but
in the usument
name IS nul
PAGE N0.: PAGE NO.:
DATE: DATE:

example
þublie DemohuguenO Example hublte clam Antmal C)
hemauaguan) int
Akigannidj
Ayoism gut huinkln (" Helo)
Aninal Gnt legs saku
Hhis.
&oud
he
Doaajuaguon
sakmut hunnln " lega
Hella
t&ound)i
2, Fàsamekuuged. Canghiusckoau
Pauame teaed Congkuucias
Loog tuucko snohieh we public 4tatie Iaual main
a
Amiml an: neu) Anima(4,"
"baiboa;
Ono display 0;
-PAGE NO.:
PAGE NO.:
DATE:
DATE:

uoit
yaid diapla
KyAlerns sut puinhdo(" Mar
Iy Waiable
2 Meho d

Cong kauucta
wWaa teat
ne upe oith Daku'ahle Atake. ed main (uing ouga
This Aceneio oceul ohen Qde'yed
clox nd bane clam bos the Same Amal sdiplay
dota nem beu In that Cane theue
a foaibliby otombquiy au the Maximum 120.
VM Apeed
examþle clas ebiele S uoith MehodA
int max AFeeds 120 hem ue Wont to Cal be
Thig is wned
afaeat
Calu etenda vebiale bn child cild baue the Agme - nomec
la
int max ahed= S03 methoda Hhero to Aleole cmbigut e
We tbe
PAGE NO.:
PAGE NO.:
DATE:
DATE:

mpie laoa þegant


said meaagel) &udeplay
Cesaanclog); Tos is huden clana
Peeson claos

elas akudeat eakada þeunent ue


h desul! Cona kuuckau
Aupeu eusawd uikha de<ault Canaktu
kctou a bu Comtnonly done ohenAou ant
Akud entcloas" to exhlisthy call he d\ault Ceng kuucaa a<the
Auheu cla aunn otthin he subalass Conakueas

doe baue
that he Auheuds

clag teat
publie Atoke uard mainn(Sthun
alugaci)
PAGE NO. :
DATE: IT PAGE N0.:
DATE:

unkaouj
Aheita
Aasnal (&huing 4peaie)

Congkuntoa
clas dbe exead Aninol
Akung bueedj aing he dupea Keyuonad otha pakamtkiues
adcnakeickoa NinJauo done to calla
hueed ) Conaku(to
Coahncka'
lsel oll when you wont to ueuse inikialgakaa
Conatuyctay and
hsuuid Aome odiHonCoalemiaon
Hhe Aubcta Conahecto

clog chicle

wehele (Atwirg pe
publie cloaoa matnf
hublie stabe aud marr (Shung
PAGE NO.: PAGE NO. :
DATE: | |
DATE:

int numheu o clouko


Cau int donA

clam Main
public atahe (aal man
Ca Case neu Cau Chetan 4

Caulahlai

You might also like