Java Full

Download as pdf or txt
Download as pdf or txt
You are on page 1of 162

Page 1

hana:
Name.: Shuabkam
I NDZ
Phafapab' Sub.:

Std.: Seclion: Rol No.:


Taacher"s
$. Ala. Data Page iHo.
Pessasko

the
JUM.
Page 2
Page No.:.
Date:43 t4L2023

What Computenl
an
A tonputes eletrone
tha&torus and Prouses data ten
'n qccondance
omOm, hom a varsab prognamme. sith

Componnt Conputn
T|oTaput(output)
CPU
Prinay
RAM
pMemory

Hayd Dük/SSD
CPU
Cenal Pocenng Unit)8--A comn puten'
Cental pocersOH i (CPU) is among it
mos (u pruocesses and
ialomporents:
exeut COmnanols
asas omputey bhain t
ano
DD

ge
8-Prinmytona and

Lftnatl memoy!au othor namion


memoy to
toasa
asal
maun tonPmay
conputo Memoy
yp haslthe pro ceso
UU
thecata, bus:
kgi RAM
Page 3
Page No.:.
Date: 1202

lache:

Supnlonnputen
Maunlname COmpuwt

Mioo Computo )

Machin level languag


Assembly lwee

htyodution to JavQ
Wniting,
proghammes
compiing
anlshinple
nd
dabug
tfh
cdosbasco
orÁLAd puograming
pruogodoaentsanguag,
e
pailitaty the develomt "ese ble
Cocleand modusar progamms
James GB, Ling inwented in qgd and
fo Orace copoMaJion
eetully old
Page 4
Page No.:

Date:202
basic atses
Sinpla
0byet- 04iented
Podtable
Platjoun nelependunt
RoBust
Diteibttd
Dynamic
wtRuito Ono Run Aywheia
Main ho in
Jaa it
pubticitate iuold main (stngt1 ai
putlc
Btatic lan be Cale frwoed fthous
obyeo eeatton
fhe. method
main nae 04 fhe Methocl

Staticaly pa Janguags
to as

Dyoicled at hetin oMpilation,


Page 5
Page No.:
Date: 202

Dynanoicaldbaid Pregnany
to ynaa
vasiab provi d'ed
eeution.
ython, PHP and Jawasilp
Obyet An an ientty
tatbf analbehautouuaset
Uhas, ke, markes,pes, tabe
oul
Pica
d be
faeletual
intangb Baneing
tation
entty
An ooee has thoee hayQtUÚa

Stat Repoent datavaus


borhawieu RepHesenti hew an
behaes fonihes hunction)
3
Tdetity A

fnplenent cbjetb fdentikation

termcioi thy Sinilayeharatha

nom which thengs Can be maoe


may aABeneas
Page 6
Page No.:
Date: 202

Held
2: Method

Constuctoi
5. Natec Uas an itoyaco
Vosiables A
vasable PA h
nane
a
emory- aloCatec) gsewed
m
be theughti as the name
a memr Locosionín. 'othe wor.
Data Types means
Data 0'typs the typanevàlús
(an 6toro
Thoage fwo
1. Pinfiye Data
byte(8 bit) -1228
-
to2
8Ront (2
bye) 31t68 to 326
fas(4 lyte) :2t23-|
Long (8 byt
Float-Pont umbo

co uble
Page 7
Page No.:
Date: 1202

Charecerus
Leha
Beolean
boolean (2- b)

2:Non Poinitine Data types ?~

lases
Etc

TdetosAn' Toletihe gren to


o
packaclas înteaco, metho
et hae
tkunt nams
Upenatos in Java
There ane6

2
Kelotiena Opneu(*,K?,<*2=)
Logical Oputator (,l)
Opotory (tt
(ondî tional Dpeat on Tonay 9poraton Page 8
Page No.:
Date: 202

Condfonalg stateens)
taemet

4Btatemen
(9 &tatement
Page 9
Page No.:
Date:202
amon thsee UQables wn
Q.
Hrl lowet

b
2o;

Pat hes =(G«b)?(a<c?a: bE(bcl:b:;


20:

Loep
do
Page 10

Page No.:
Date:2O2
Patten fyitg

*
Page 11
Page No.:
Date: I202

NUgion centol stem


ve ateo by LinusTöway
io 2005 and! has beon maitained by
Juio Hamano.

Q.
Tnakg code change
o
b,
Trak mad changes lika hätoy
cBdine Collabonatons
NCS
(voson
cordohang to a
versíong ate,
tee., on eey bOun coda Changes fo
ne voson wie be catcd.

fvcs set

noce clon

Thre aoe toe the


aLotalVuion Contol Syatem Lve
Condo Syten (Cvcs)
Distbtd Veon onto temn(DNS
Page 12
Page No.:.
Date:- J202

a.Loe veson conol Btem CLves) vos


to maitin thehlo
en
and utee the ks
specihi Veon
|Dr1abQe

may be ues
data los
to forgt whith deutonuy
You a

cenét
borne
to t
a c
dertely
aciwnong
tit the data
3 by mstake we can clleto thoe files

Certalse Vesíon Contolu Syatenn


o
Deveopes Can colabo Qt nd the
chengus Subvejon, ffoce
.
Canised Vuon Sen wile ha
kingle bewentha contaiy aethe
vuíon
mor Client

may years thin


hi has been th
buystem.
btondadvSOn Conol
Page 13
Page No.:
Date:202
Ardyantages
Knows to a
Cetein daghee
tha eweyon -eon thepuo

2
Adniuitnaton ha o
Ontgol
Oe (an
who do wh
and
manage
Dawbak
Sing poit o
{auu (AF) that entaei
hepusnt
2
the hwe down konan hew
then Eot hew nobedy (an
Lcollabonatt
hangs to the Besves

3.
hand disk fhe centnele
oie and
kept then
baep haren't been

Note
lo LCUS
whee yol ce hawe n
ent
history 2poet in
a' sehge
plac, fhe ie
Lohing
eying
Page 14

Page No.:.
Date: 202

aluays qet the latest cgee


bt notthu en hitoy the
Pnsoack
Repo
t2ory
or

wonein
P P
PC3

Ditroted veeston Cortol Syatem G

e
DVes Git, Mehelal Dorey
Bazas

Devop dont, hoeK the


latet bnapshot the
nath th4 nc miruOn
poxitoy
Beun oli, then
a
ke

wie matain

has ata
emote
poU
changes fa the Loctupoitory
Page 15

No.:
*2ryPage
Date: 1202

e coee can be
phed' to ono
epottoy
Git cormnenoly
Vosion I
the veion
2. help- Tt \th vQsíe
Comany.
Byntei o help
3.t Contg The (omnand
leiop fetiy name enaiR,

Aatuate
peaton eountead.
Betthe Ase9UQne nd emae e

-qhobal wse. se.naneNitán


ONqTqoba email shhemgmat"
es
the the 0mnand
whsch to tup the

Rt tatus Commnd
Thi ieed to
Ccheek the status o theo 0kA
dinetor
Syntax
Page 16

heloawa Page No.:


e eramples below. Date: 1202

the ode om
wOepaut0. Atage
wethe oliouaing command.
Sqnta
P

heeo
qt add hooaua
n
stage the Rles
csorompobsials to
ktaged
Comnanol
fn-- Cached heloaa
To
etone th o

koloo Command

qt etorohelo
comne 1h iles ohie ase
omnthoebe
o
oinanl
cormnit -n Some mg
Page 17
Page No.:.
Date:202
aa emotupottbyand
otAteps fo be
to hernot
o LLOwis
po oy folousg

Cneats, eposfoy înto ithub


entU bome n&melep
amelposiro name)

To

oÁ t- bManch -M main

qit push main

us pure ano ceone


Doence Ew
hangs maola fn the
emote eposit-y to the w0Ky

Syntez.i
) qit clo
the lewepe
Syntaa
Page 18
Page No.:
Date:1202
cwseo
|O. Log Thiu Commanoa
the veoron histoy
the the
poeovicle histo'y o
ale theset
qit &lhous thi ommano
shouo the metadata anol
Lontent charnges4

Synteqt &howeom& id>


12 qit puush this commano á wsed
push the code
nom
Dnemot ocal
pnMot fo
gepoito
tmpty uposi

qt bnanch DM nain
peuh
Case
qTenoto
2

ald-
Tupo0
qt bnaneh M m

Ogin main
Page 19
Page No.

Date: 1202

att bnanch bManchname


bNanh 4eatuu
Ued to
ommast masten
banlh, ie, Lohateve
byanhcooe fnto
atue bana
To a
dalete bnHh
bnaneh -d bmanchnomedelti habna

to
To nawiqats {hom ent bnan
anothn
bnanh nae
How to qet gnomot bnanch dethi
"Rotal tepositongy
wat to
to Qt the
(mom
Pet
0Lone theh coplete byanch t and

and hoo banh


detas meN

dimetoy
Page 20
Page No.:
Date:. 1202

. ro
the podated bHanen aeteii
amot epo nt Local epo.

Thi omanol
the changs
om one banch tO anethe
onanh
bynta bhanhhm

hatksd Rle fa tempon Dn.

useto
ternpoaaly stoes
stous a
al the
the modiied
tnackid lei
qt stash 1yed to estotu
fhe mOst bteshec ils.
ale the btaheo hanges

8hi comnand olijcay


h
neeenu steshed hangeses
Page 21
Page No.:.
Date: 1202

Ipotet poût
hekOt mast omnand
hetuan to th mot bnanca,
2
ot uone con
Conmand dounloase
JUM data ana. t
Page 22

Page No.:
Date: 1202

obct Cgieatfon

2he no delet ppenas0MIn 4aua


berauy olestution Usele D
byet
Lolleo

labs Test
Shng nane
petale stetic void man(shcnU anp

n
abOve. exanle
&D the obyeet
Behsnd the &
cenes
obyet Ceaton
UsedtoTeato the byect
ne Oporao, JUM
iotte memoy On -e halp
Qre a.
Page 23
Page No.:
Date: 1202

Jumwe oad the sepped iass


hanedata fnto thu itho
JuM i fnetalise the memy
e
fnsten vasable
t the dyauval hon
instance vaiahley bao on the date
Once tthe memnory
the objet wle be storud
i ole
the ueunee vasiable.
Tueas asables
lo
basal on fhe typ
a
value epseyuted
by vaseal aeasiables

(fPinive vasables Pinue


Can b
ed toteprresent prnitie
aley.
p

vasiables
(an to yonoeb
neu

bad On th behauiow and posion


celasatfon

vasables
Page 24

varepge No.:.
Date:
Koap hinó 202

at the
tin obyee
firne
oreation
athe
CSdeion th scoe fetfstens
honce th.
stulsion hence
yaabley the Qme

Intan (o. Uaabee vwi be torie d on the


pa
Aheap Qs the eobe t
stan Ce JasÍable should be olecaed
withan the class ciretly but utsie
tenca vafable Con be
accemed dinely
dd.om the hytenle Put annot be
hom Q
8tatic Qnea.

.Lhsten ce. vaobles those varoble


whsh
he mthocls
with the enle
nea.
clo Tet
psvr moin
Page 25

Page No.:
Date: 1202

(a fnstena
Vasabl

vasuable whih deared ínsic


method/kunetion Calie Locol
Vaable!
Iocal asables wie be stoned inBide
thebteck.
ho dolal yaiables ote 1eateo
as paL fthe bOKxetion in

Cnce blo eeetion


hat Complt
Ren the sop
ce o
the loalvaiabe
as the sLope
e7Quly thoBane
the bOLK

Localvaoiable
fo the
provi
nstíalization
Page 26
Page No.:.
Date:_ 1202

fiStatícvaiablohen
that vasiable anl shaie
cobee VasvalaleA. AU intences the

-
IpethodOveloacling
TO anomthods ane sad to be Ouod oade
A ito
ooth have the ba nane
ibutbut dEen
the c' language t Can't tko 2
Methody
name!
a
no'melol namV
Hauing ovoloadng conept fn gawa
Compley fh proghamig
to pobum method nesolutfon (deifon)
on on
Paseo the gejoence tuel but bayed

Consdeol
poymonphiam o statíc polypnohia
binding.
h

saiy
Page 27

Page No.:.
Date:202

Automatie poomotion t ovodoadiag


byt shont
Longotout
ha
Ouloaced
loheo method

YsOng Oulo aole nrhoa,


the ch o
claswle moe phioy
than he paentUos
to fndex coueon
Pinec no. o
"homogenou data eemet
hoeing meitpu
the progham
Thee Sone ee
s A#
Kle the tini )constion
tompulsory webs

egu fo hawe
otth
Page 28

Page No..:.
Date: 1202

wedRuaean
Neftive Aniay si cacepfn.
egt-intt]a =nwi-s)

the
a
byti, shont; int, han:
Rule The main u
iza in (awa
tha
the maimum vae
length)
kenath
las

An withot a
ame o
caled
Angymoa
Thi
Page 29
Page No.:
L
Date:. 202

we u acce the polo Oh


to
not the ay nange then
Exeptíon
Calted Aroe helerOut-bonesErepion'

Qcus ohenthe OLne Rrceecy


daa Rn
the stonaqe apacRty of the memoy

Once we eat the sie cannot be

C6torus Onty homoenouy ata elenet


Page 30

Page No...
Date:. 11202

paxage Called
dto
coltetion

Sting fuwo t
Tho, age

Tmnutabl
) Mutable Storing Once we res Q

Stying, on tha Stg to


opratioHaad tho
chaiqes qr eeted in the Bane

"Mutable

Lmtable Sting Once we

theo tra StrinAon that tng


y any
putorm ponation thn
Uhanges ooF be meteted
fnthe 6am obet, thn Ane
heated. Such ype et
caicd as Lrnutable
Stog
Page 31
GotntfRunettonta d to oín to Sh

n PageNo. :.
inmtabee Shohy Date:. 1202

Stng cla Const4utO

8= neu string (Stmeng itoraey


On' wih Sting itena
on hep

o
eati equivalert SÁoig olet
Shying senu Sheig chan

charate anay
ne [J6)
Page 32

Date:Wi202
*sttng si "shubham"

above ethod ko Stoung eation. Sraie


oRattd fnto scP(Strung Constan Poot).
pnth heep meno
but it avoic the atb ipc value
Heap

Shesha

Dn above exampe S
Qd S2 haue tha
value
&ane Value 60 SCP awoids
SP auold ouplicat
and grenee wwlee be iven to SI ane
S
bot.

Shgung Sys heShiin('shubham);


thi etho d
ingneu keywone
Cheated ice the haap menoy
lot utMoe the SCP ( So9ing Coytant
we n
Pool). by thimethol
daplicate alaus. Ana alyo One
hae
Page 33

1202
Date:

utable Stoiy
wd to (eat

chain
-hn obr
"Winas
string
Sb
Soplal

Note change
obet ea
td To hareee
Shsing Be Buikdan conpt

VJ lengthl)
(apaityl)How may charQ

How
lenthe

Sope Sb. (gpacžny)


no.
Sb lo0,
Page 34
Page No.:
Date: 1202

Delkrene bluo Storing Buil dun

No method e
dynmoizec
At a
tin morethah one huad
not Thuadsak
hread Qe not

VOsion

Methoclo
dkl.oNUion
Synuhnonseo
A+ a
tm
Thnado aneTuqihed to oait,
Page 35
Page No..:
Date:. 1202
Encepsuation.
Bfnding o d
ate ano c0respondi
method
"encapawation".
Uas loLOws data iding

Encapsulaon' Data h
eing t ab siaho:
hewantae. o4 Encopsusahon
b. Lnhancernet beonnes
Maiainabity Deoaraotion
od-
beomes cs
povidesexibit to the w
fo

Púva mem
wn ntena
bes
Should de not go
date
toa fhe uthicle iod cinectly, that
eces
Otiole people bhoued not
Dtsalo
fntena data cie cty
e

Roeleme data hicing

privat douwblr balance

Rerornmended meollfie
nmootiies on data membey is pr
Page 36
Page No.:
Date:202
8haolowíng. Pyobtem
both lteal09ialol and instan
mothoclthen Uwo swt ín a
nane
lash Qnd vm wìu.
on Local vaniaal.
Pene
Knoln asshadlowiny proslem
Thi

Stuclen
prúvat Stocing namu
(nid
pri vott Ssúng addes;t 2

Stuclent SAúng name,int Stting addsye

acldes addses;

Above Atu Sucen funttion w

produce an eron ecaw Shacooing

Resolion
T0 hesoue sha olouoing poroblom, we k
.
thi keyono
Page 37
Page No.:
Date: ! 1202

Settu nl
SettuiA Sette method
th al
thvaluto to the fnstena Veruabe
the ass

Syntex fon settn method


Compulsoy ththe mthod nane &houlo
ta with se.

bT shoul be public.
C-Retin Bhouea be void.
Compulso-ly t 6houd hae &ome
asgumenst
te g
Gtto methods
the value, on the fnstane
yasiabey the

Compuso tho method nameho wwd

t should be_publra
Rtun type shoulo not be void
Page 38
Page No.:
Date: 1202

d
Cnpusorile it should not
hae any
ngumert
SetteU
Privatr Sring narm
public vod setNomel Sting nama)

thisnama name;9

ego
Gutteu
public sts-îng qetNamel)

boolean
ther' fon qetten ethod ye, (an pesx
with eith
peblic lass stuclons
Privat boolean maiedi
pblic void btavd( bo0 lean mves
thi. oel masUve

to Qued.
pubic boolean
Page 39
Page No.:
Date: 1120O2

onuton hay boma naefo cla


Funtion toih
nan ContuttoM,

but inhalisatíon
Rules ton Consdueto
bgea No fhe oututon ton nd none
4
the, cas me
be the óae.

Retn ye coNept not aAlscsble


prcuice
tuolobo then the J awa
longagg ore tneat thas as nomee
nmeo
asTest

Above funtfon
Snomma metho d

The
dyaut
The
othg modlen wee
we,t. would
Page 40
Page No.:.
Date:202
Lompes
3tétic Tet)+

Deauet Lonstsutor
4 then the lomyplen Constu
Constiton.
we
uwito Gt at &east on
-cOM then the compilen

not tonatcutO
toothSimuetaieosy
Feotoype of Dyault Constyactos

The
onsteo
Qecsa

modian
Dat CoNstueto Contain on en
Ca to

pbl' Denno)sT
Page 41
Page No.:.
Date: 1202

tuuton
moe than ne
Contun ndae thehe conytoueoohs
hauethe some
kenee ConstUcaco
odenc

fhe hut line fioe the ontuoh

fhen
,
Rl
Constueton
nyOhe efes
Compila

Clan Tesr
Test)
Page 42
Page No...
Date: 1202

we lan
but- not
simtaneowy
Test

thi'l

3we
ule
iside the

we kecotOlto the panon

this l
Ttufe nake theCale

aal thil)
(aels.

Theseaesec to ivoRe

thar tot
Page 43
Page No.:
Date: 1202

Starie Kayuora

on memo managmi
<he static 0
keyuor

ohy stetic l

a
gectíc mtho RA staic mthod
method beonga
han
an instonle
a methd
eating obeu
Stetre methDcy bornni Caed
le method

Youi cnaccs &tatic methOle


utiol the closin ohich hy o

i not POileewh th oh
Atoticmthod.
Su-belaes sati method
but non -stahc metho ts cannot
Page 44
Page No.:.
Date:202

o
Static methoos Can be

ni claj fhat ontain


muthoca.

static BeosI sd to
iíaiz
steic
ksfo h
iman methodat the tn
eXeto
Lohen tho gtloadal

Lass th'as can be frstertttcd withOs


hauing o
eot the
tontdini.
os
nece a
memben fQnothe cea
tetic mameey
he corgnig

UassLoading
foto the JmlJawa Uižtuel Pmahin)
Page 45
Page No..
Date: 1202

databaJt and kinp themiawaitable


to the Tum erhion
Rxetion.
he cleds oacing poles ta Jawe
ivided into thee phase
Looticg the
classbadin Locatytha cas
las 'nam

Cort
cet
Clas
afhnetadata
theilass obyet
the(lass,
buh s'thed
e, linkag phas the Jum
Linkíng- Jn epee
beval atfonon the
theclos
ymboc
the RasVasia bee

3 the ni tic ization pha


Ceass VQiablen
thain uyat walss anod qiem
the cles'a 81etíc inifalization Lioe.
Page 46
Page No.:.
Date:L 1202

Paincipta hunnaity
abaole
DlgatfoniA clas Loada
a
h tusponibiliby loadng la
the
attomptng to lbad Ptseey, his albus
de to
Uese tha haue alaoy
Loadec by the panent cles ho.cl
a
2
Nisbilty -A cdas Loacod by clan
loaden anol i t child clas loadi
Thu dehersnt clas loocle
to the
with
Bame las ubithous

3Ugunss
Seuoty
FtenibUy
&-
Dynamic
am path ntu
q. Laacin 0oler
D ment io Java nogrom
natan Ce
member &
An inotanee memb
sntiy any thing thin a clas
Page 47

Page No.:
Date: 1202

fhatUshothmaske ay'nteÍc has


an
u, tha it
instanco'
&
fheUass has blin
madalaith the neo. Ky):
neco keyuore). Thi
becaue fnatence menbis be long tobe thong
obect, Lohsiea statícc menbyO
to the la

2: Statia hsslen Static en


ane hich belong to tha ces
n
ou Can acceA thesee menbe
Arthu nstentiaing the las The
me
Stetic
Keyuond Can be ed with thools

bluo Stasic and Non- Steatic


Dilorncoi
arclas static
Static
(hei yaiObssare CalelotiCeasvaihle
hes Variables w
qetrmemo fn thu

Y
th
valie does not hngeo
tatte vavoaes
Stetic Vasables
tatic keyuso

Non- Stati
Th vaiables Pfenee vaitls
va'bls
Page 48
NVo.:
Page
Date: 1202

theevai abees momdy


heap
oeg to
theivalue changes hom obei
to 'non
Obet thenneee
stet Vaiaoles
non-8tetic Oaa. we acte
boh tetic anol on&tathic vasc ble.
(Non 8tetic Vau ables
witho wing?the"gtaric- Keyuoo

thsos
dalased utho
primondial claw oyet, then theaiuit
cotuetonhas emitybody: ÖtAnus
ínuokes he
agumt
Page 49

Page No..
Date: 1202

hhGance
nheitance amechaniam

Inhertancau Qchieol by

au ailebli to
tho Cht
oDusdbe
wheneas chila
0ont be aua kable to thePare eas.

Panet Caw and hed clas netho


Panent ae
whea. uferene we
Cen
Poront as metho

Tnheitanca
Singke level inhettance -Only one
de ived nom fhe panen clas
Ctenc
las B

wtlevee Ihnhesiten co fahetana


to
ano he
inhert honm
httae
Ho. that
Cnoth.las
Page 50
Page No.:.
Date:. 1202

Hiea chi cal Ihheitan Co


in hertane many' bubtla inhesüt fnom
ene Aingle cla
nhitances A

eClas
ClasC eten d

a
code and dyname posybonphim (metoa

Mutipe in hestitance
a nhertanle a
subay
hii
Can eatwra
in
fom
pares Cles

uuipe inhesitanco
Page 51
Page No.:.
Date: 1202
Hybid TnhyitenceBybrds
a
'Combinaon e mona than two ínhátaneeio
yees a
and mwiplo.
t an be achiewcd onyi be tha inteyac
D- à baically Combination ee ìmp, multipe
andHotanhia nhetane
methols

1nhitd
Dusdden
3

kited he
methodohi w0wlo corme
om (altedíghstediethod.
due to inhetan

2. Ovidlen mehod8The metthod oh'e


taken nom
bnt anolchanqe
pen the nced
imeemertionas he
a
the
hequhomens in
"bveidden methoc!

he' methoo! in pasenUam.


Clas

Llas B
ertenc A
Page 52

Page No.:
Date:. 202

Specialed methool (-Thu rqettel methoy

are
Apeihe tothe portietan
Caed SpeeiatizeQ method "

pubic void mehoclonl

SopLn (" mhod hom Pasen

clas d extonol Panent


publie vord methodono C )

Sopla"Mhod hom Chied))

Publie votd methodtuo) speèralžed metho

Sopl n(" Mehodtaso hom eae);

Spedazednot methocla
n
hested
ae thON
ndaeyo
nethoals
no Dueoielde
Spe cia lied methocls cre p9usetio chlld cle.
Rley to Dveso cle the method
he pahet las mtho h'a OvUcden
fheouidolen mehod.
2 Us methoo ovedoiny
nethod called Oueci ding method.
3
mthod
by Jym bud On
Page 53
Page No.:
Date:202

huntme obuee
Conidated:
hence oveyoing
polympsias
ao a

dlynannipolymnghiim
1heprotam 'e Ovoueing mcthod hejoltion
dham'c method
dispath.
Constoutos exe utfon ín case
CoryrLetO the fae las
Constu uod be ereuteol foool by
Cild cass onyucton ui th
thi ihalp o

"Suprl)
aca to panet
claws Constuton.
Supenl) to promoe Lontn
|to) Chaing to Qt inhitance lovel.
Page 54
Page No.:
Date: 1202

Polymorphiam One
no thani
-
theni ucaeol polymenps
Static Polymonphumatled estShaie
tne then t Called Stahc Co
at omlaton
lolymohphm
verdoaddhg

Dynaie Palymorpkiim ho pokyro


thed thapolymonph
huntimethen
i: calied Dyname foaromphim

e
Reles to Pesform thod Dvotbng
To OveU clo las methoc uoith
Aus
ot
as, thenupin
s
cleys
clas mthod
m

be dolared pruvaG
2- To methpl with Bb
Dvehide bupI la
class methol then Bub clas methoo tt s how

hawe the hetn fhe dup) (las


mthod.

Sopln Mi-A");
Page 55
Page No.:
Date: 1202

Sopla("mi -e)a

3 To ovUi cde
method tth
&b la me
thod supn asi mthod
then'
Imut not be
celared ay ha, sub
Uas methocl

vord mz()
Soplal"mi-A))

Sopenl"mi- B")

bupinclas static methocl with


bublas btatemethocl then Lpe cy static
method wie ovcle
ovYdebla 6tatic mehod
hee JVm wiu qneMati output g
hom dup
stehemuhbd
Steic votd m)v4
Page 56
Page No.:
Date:.
1 202

pat

So pen( "m-B

puublu'c cas Tet


a. m()}

5 s
khe method
ies metho d
ofhewt thi comnpia we
en.

protttd vord mil)


Sopln("mi- A");

A
cla exends
puubic voro
S
opln("mlg')

Abov
ocdiu prodeee
Page 57
Page No.:
Date: 1202

lasmethod1h
howed hawe
ubela
method subelamethod haue ithe
same Qccespiviqey Qcce
phivikege when companeo ith Aps le

Compil Tine Polpnonphim Kun Tine Polgmosphi

ethod QveloRoli ng

2eDinent methocy 2- The 6ame method


Siqnatist 2:
muut be prouieod to the profotye mast b
methol Qovi leol to fhe methos
3.
wth e
without inhoitanu s. Ontey oith inheitan
we cen pton mehod

Abstra keywono andl Abstnahon


The
abstna keywond
nonacces
methoo

an abkhna clan
abstrat methoda. towevey may
CONen non- absta methody
* he method dodased fth
Page 58
Page No.:.
Date: 202

CosQtKeywonand doe nthawe


implemetation
methodi

Enployee

Anal clas
a
)
las mad as inal, thnt las

"Lompi Time Gyon"

HnalVastalole
asvaiable maked as nal, tn
tho vasuables
tine Connstant and we ghould not changet
alet thone watablei
Haae method
Ya method declaed as hnhen tho
4 methods wwe
Cant Oveov, we
Page 59
Page No.:.
Date: 1202

anol Firne
Dgerne blw Statíc
o
Static vaabesa clas menb,
inal vQsables ane
in tane memben

2tatic vQsabley ftaed once, hen


whilskna vaiables
eauhtne Q

Seatd.

3 State vasuabley oe Bhao


fo tency lar ohie vaables
aneique to eQh inytance
4
Staic 6hared by auften es

aleshil
fnstance.
5
Stonc yaícbls Can be accenest without
,
an ooe shi kaal vaa bles heA
(an be obe
been Chcated.
Sta'c mthoey
variabes whi fael mthoos
be wec to acCans Kaal varue bles.
Page 60

Page No.:
Date:201I0202 2

hgoyaceàa Java

e
vasuatbles.
ale toc het
to
yhaleence
obyeeti
unalo Chate
n
fateyace by deaut, vara bles
pubtie' stenie fna"
In fadeats, byideyat,
pubie and
Jawa
pOsMblo in

prroviole monu thareas


Jaa
anl
ppicatíor ohen Lompaneo with
alsat classi

frteyau Coompten

vold compil cocdel);

Clas Lap fop ipl met Comatn


C)
puble vol ol compite- code
-Single Aostta method Cntoyo e Page 61
NDmal Datyo Page No.:
later Tokeya Date: 202

Sopen (You qot Sieron );

pubtie Main
pubtic stane vold maân(Stning L] args)
Com pute eo Laptop
ob=
ob. lompitococlo)

n
we
at taltssg abou implenetaion bu
Ahould

tvuy mthod prusns aostQt


anc ao shoa cti
a
Uasneed not be ppblic

mehod moc'u
alosttat clas wasiabl

estsion: onabt lo
vagiable modifi.
Page 62
Page No.:
Date: 1202

equied to peyon innalafon


Clas VOsiaas at the fh
cdedaration.
haeele
abstau ca 'we Can teke both
&tatc ndfteneo beoy.
Tuiole the astra clas Can tak
ostteton.

Coytcton.

(we don t kou about inplene


we
hawe
inwe Ahoutd go kod an ídedaApeifiasion

By mthocd pret fcee he


jateace
dodasng not.

delase inteya mhod with th


(anlt
modile privati, protcod, final, stetie, syneay
re, noive,

we ae clo clasug
not folouoi ag modiuu, Privat, protetd
tanstent, olati!
Page 63
Page No.:
Date: 1202

ttetiabln (mp we

shouto pkohm nitiažoton at hefms


fun
dalaiatin sthasiae

Snyice the Can't


intoa
blou
teke Atatic and
wtenc
hiole the intoya we
can't tke onyUUO.

Tnpootant
whnevu an intenaca
|ompuliy ton euey muhod that irteaca
we
Bhollto prvee implmethon
a
otheswlh
uwe
hawe douae clas abš HaU, in th
Ca chid esponllo to provle
e
implenetatin tomaininy mthoals.
Whenee impleometing an inteyaca
rnehodt should be delats as pube'e
hesuDie

thanoneClasto singa Cleubut


pOMible to eoctend than One
jrtoyace to singe oeoye
a
Java, îtt posible to împeemeti
morethan one intyaaito a singea
uasn.
implemetaion
Page 64
No..:.
Page
Date:202

Ymplimeast indoyacy imultaneo


A
frtoyats
at a

An
htace Vasuobles
inae Can Vaiabl.
ínteyae vasia lls
cliae haqme evel ontat,
broy ínteyaa vasiab publie
ohtht We
ate

întoace ibc
ít30

Rublic
To mako tavalaslo
asion Cla

Static
thoI
|Qcen thi vaia bl

Rnal
Tmplnmetation Clas (an QvcyThiialue
butcannot mo
NOte tyae yasuables can be Qocesseol Page 65
tnplematehon Clews
bs annot be hon the
Date: 202

the inteyau tho


clee laation
foousing

Rnal nt =0;
public etic t x=(O

dhadic puble kinal int x=10


pubb'e 8tetic nal
As cvey ínteyale vasiable by dyau
pust'estase (Qn't

Privat
mosif

Volatle
Titeyace Nanning Lonpet
naning onict
ay with 8orme
Qtwo ituy ontaina mthod
gnatue anol tetn
mešhod impleme
ta'on

puse vold methoaOne C)


Page 66
Page No.:
Date: 202

vord method On C);

Cam Test imglemet Lat,R


uoid method Ons )
publ

a
Cotan method th Jam wi

^ame bous deneng argumuts in the


íplemetoon cas e hawe to
fmplementation o0th methody
method Qta OveDolenethod.

PubleT vold mthod Ons ;

pubi vold methodons (int i)

Le, Rigkt
puse yoid Method Onel)
Page 67
Page No.:
Date:1202
publ'evoid nethod Orne' Linti)

method
ith the
Came slnaenot but cyent eturn ttes
hen i O
posible."to ímplenet both

pulali'c votd methodOne ):

inyas Rgr
pbl'ci t method Oneli )

tha
fmpeenets both
intots
awa clss (an
multaneowsly
a mekod

Lith the same siqnatu bu l lus tn


\M0iOble namig coicG with
Tuwo Can Contin a
the O-me neme Cnd hre mey
may be han
Co

we
vasiobe but
Page 68
Page No.:
Date:1202

neole yayable
nome
naming lortic by ing
irtaa
an innyace cntan
doeint merhools
fmplnengina
hame
tyee

By a
fnplementing Seriasiaahee intyae We
Oconseno tha obeurtoro the RotuoorNe
Cn bawe he btt obyét

See (an proten onty One citugst


at Ceun "Thnead

by a
ímplementi Uonable frtea e

posiion to proi
ouplico cloned ob{et.
wthost mehod ñ
the akn
wi
Ay Trteinas rsponibli to ppvicl
uquwned abilty:
ntyeetyeRarNomal
method iteyae Page 69

Page No.:
-Maten Date: 202

ohen khould
and con
we
t
goo nteyateabsaz
knou
clan
wc
olot 9nying a
bout implemer
aion hawe tuqweneg
Apeefte speeifcatfon then weshoued
iteao
toring about inplemertation bus

RhoMd

fLking akout împlemetaon


tompltyand neaoy to proica sewca
then we
hoed oT aa Conout a.
buy
a
method peent iniol integace
ab bu- abecac cla
(an tete abstat meshocy then ohas
iu
the neecd fnteyac, con teptil
e Loncept with
(an neplae inteyb
not a qo0c
pogammg misuig the
abttnact cn, Dt may neari

Jaua 8
featuus

Daloulr rmehocdyi in
SHeoic
2•
mhoci in Dteyac
3.Cunionas Tateyes
Page 70
Page No..:
Date:/ 1202

an lcggkkneragog iateoyae fhen


haue to fmplem au ha inteyace meheg.
mehool
mote no. Uase with yasialole
inplementotion pot
Dn
the abve Lortert,
muthood implemeton mmon to wUy
implometaton
we
clo uoith jacol implenetaton
hen haue to
in the îmelnenr Tha merhol
daaut nethod

Iò lelese dyau methooa in inteales


haue ih method
'modi
daoust
Stem.ot prito"MI-);

lay Tet
publie stet'e voi d main(Sting onyo)
f. mt.()}
Page 71
No.!:
CAPage
Date:l 202

Note mitho a proces


the implemetahon

void malO
daaut
System out-prstlnmy-a)

las fmplementi Dntey


Systemoutp-tln l'mi-A"))

public Static vDidl imaastming arqs Ci)

1.

from Jawq &


von steie methocs au
AhareailY
we
de daebteticmuhoy in the
not equinee to lelae
fnplemendation
methol we

nn to acces taci methocl.


n
Notd- Jaua 8yyfon, intyates ut Rayuonalow Page 72
methocy eithšn 3tctic"
6teuh'c
Kaywond,ogwith Date: 1202

Syaemout prúnthnl"Mi-1"J;

public statie void mainlStnuing anga)

Punctiona Trtaca
4any Jaua interae allows ondy One
alobau metho then it cale
u a

"Funfonal Ihteaca
make ny inckaa as Punctfona Intenyace
hen uwe hawe to we tho folOwing anntation
the
ut st bove efunctiohdTntnae
h
untfonal Intae method hae
we
toprrovi cl
we
One but
no. methocy and
no
tac methoo.
afuncional Lnteyace
odyae Lntn
void mC
mg 0
vold
Page 73
Page No.:.
Date: 1202

Sytem.ous pruittn C'm3- 2);


my
static vold l0e T");
System. Out pruatln"my

as A
ímplemet nteyg
pWblc vod me0o

Test
pubic las
pubeie statíe void main (Stitíng anti)
Cntan

Trtnmy0

Output
A
ni-
Page 74
Page No.:
Date: 1202

as jid he

Thareane thoue

0Memby lass
A

pueie vold shouw)

publ'e void diplay)


Syste out.pint"n diploy

Publie Uas edeno


pubb'e 8ahie void main
Page 75
Page No.:.
Date: 202

=
A. ob1

ob:shouwC)
obi.diplayy

Stetic cla

e
pul'e vold show)
System Dutprnten" fn shous ";
B
stethc Uas

publieivoid cliplauy )
System out prinsln ("in diplay,

pubie Lhoono main (trngLJ ags


public tatic void

Atetic

Ob show();
Page 76
Page No.:.
Date:- 1202

Hnonymow UoBwhen
rnni medtotmplorhent íntyate
th Uan enly fon tn. So to
heu
honymos Ihnecles
eai fnteya
vord dúve ();

publ'e sOtic votd main lStmung


C agp)

publie votd driu( )


Ahonyno
tla. Sytem outrpritl'Driwing-);

U,
Ob. doive

(ant he heated
Page 77
Page No.'
Date:202

Lambda tpmiori
Lamoda cálulw ú a bf în the
thange
mattematal w0loohih UO0fntodu@l in
1930
LISPn
Lambda xpeaion.
The y ú to
main doyetive Larbola Exprufon
bring bant unttione proghammsng

what iLambda tapesion ?


Lambda (xpusaion. e an anorymos
(namelen) unetfon. Tha meOns the intion.
ohich cdoent haethe nome, utnn yee
modigens
Lamoda expreuson alo
alyo knouun s

union
|Lambda cxpression u

hecece
Syntar
(PanamUer)16od
Java anbda erphess i0n onistol thoe
lpomponent
Agument it
-
sed to Bnt agunet lit
bocyi 2n presAiOn.
Body o- B
otains exprelsons and stasement fo
Jaybda cxprenten.
houe wo O4 more Pooms
Page 78
o
Lambda Cxprenon (an No.:.
Faulargumut). Page
Date:. 1202

1
amboda expselon skj

DNo Pasane aten Syntazi


C)

ODne Ponameten Synter

Tuwo panametn Synta

Can

Vold duve ()}

91

puwb'c uo'd dive()


Page 79
Page No.:
Date: 202

Ob. dive ();

Nou
olbovemain methocls onte On be
mace hotei by wsegLambda Biposon

Cgn ob= () Syitmi out. print DUi na D

void dssvel in
puublie Claks ABC
main
publestei vid

awA)
publievoid doive (is

ten uing Lambla Expes ion


Page 80
Page No.:
Date:I 1202

Funion Thteau
4 an
Pnthod, sun typs m
untional inteaey åndl ho method u olles
Kigee alasinoe

Runnables contain
lCompanable Oy mparu Tol) mehod
Acionitenent oNtOi ony atfonfengomedl)
9lable cONi ony cauC) mehod
Note!
Sun icUOsytem íadeotued
()FunionciLntWace anotaion to that th
Vponttonaiinty
NOK sara
n
A et keyuoh ot aay
neguiad (On bptona) in a lamba er preu ta
on thhe Aiqraturu the
untionl fteyace metho DbraUkoA
nequind whenewe the t
Qamboa erpresio
omitted fhe ambda
expneion' by ONO 8tetenent:

1
Noi epio În Jawo ae 2990N. Page 81
Page No.:
Date: 202

There C
thsee

OSyrtax Eruon i

Thee mintekas a
ilered
by a
ezetion
Divison a
tuino
egi- eO1.

zcepton
An nw antd xpetec eventthas dits the
nomal
Eacephon
pogham

ereeptfonHanling
Exeption Handiy thu
exephon.
we hawe to
LOntine
handling n altnativ
b Eapioa Hhoctling
egi la EuphionFut
publi Btoke vold manlSttingC] ag)

nn1= 6'
num 2=
Page 82
Page No.:
Date:. 1202

esut- nm1um2
c)
Cath (Facpfon
Syptem:out. pruntln 'Something wet

Ty wtth
metíple (ateh bloks
handling he excephon
extagttontyee hocommend'e
CateA block.has i
uli (atch botes pomible
ended

Cateh(FuNote found Excapton e

Caten Atithmetic Eeption ae)


Page 83
Page No. :_

Date:- I 202

athlSQL6xCopBo e34

Caten(Extephon e)

n
above e2mpe caseh (Exaphon e)-- .bloK
hande any

Note
mutple atteh btor prst
ehboky to
it should be' hom child panet OthasuoiA

Edleption XXXX has been caLsght


aia
finay Bloe
not ecomenoleodto cean up
ode wng
bok be ca thee
eu Ataemet frole
block
o
t not ecommnded place clean
<he (oth boKibROz
then beocK won'
exephon
Page 84
:"
Page No.
Date:. 1202

up
bome laceto miteLin kan
ode ohith &houd be eze wt
Loheth exaptons
and chtho1 not
hara c.
Suey tyeu q
best place s
nothg bet
block.
to maixtan
deap oole.

handeny cocle

Ueanp code

Euen though the gutn Btetement


on cateh bloces pesent
ut finaly gle be
ee uted and ten that onhtun
btatement wio be conyidoed.

bLock doininates Tutun Atetement.

9
Page 85
Page No.:
Date:. 1202

pibu'e Hatic votd main Sting CJag)

Sysemowprnten(y block xcused 1;


etsn:
CatchAúthmetcExapion e

Systemo prünt lnC catth blok ezeutdy;

beouk exctec!

Note o pese in try.


and blo then fnay bol
btamet wie be cOnoe

Thae On &tuatfon whoe the


blok LoDn!t
mthoel.
ing syptem.ex()
whenen
Page 86
Page No.:
1202
Date: I

won't bee1e it.

Le, Systerm.ezf {o) olomnate

Sys term. erltlo)


hi agument atfaks as
stay co, Dstead
we
can't Vale.
mea
nOmal teain ationnon caro
Mean alnon mal terninesfon
Thes stetus
ushett Non-zeo thesu& no
hang ia

blw
Denc
final
adijapptcabla
nethds and vaable
Q

de etared the final then hitd


"ua (neation úú not pomible.
Q
methoo ú
clelaea! as tho Rnal then.
Queeieling e not pomibe.
a
hat method
Y
vavabl as the_hinal then
heamignmnt Not pomibl.

a awoiateo' with try Catea


wp
to masntan lean loele whiy ho d

be exeuteo alays nepeive whethei


Page 87
Page No.:
Date: 11202

Taincd sotnail ano


whethe hanle not hane.
hinaliza
methodaisay iuOked by
Ghan bage Coueton
ce anip. auitiy
an
obet to. pafoni
NOHe
8fnaly block mat fo eanp athi
telato to ty blok wkruefnalice)
bloe wleu
to
methos

foru cdeanpahitey elatd


To mantasn ceanip cocle fnaly block&
peommended ovon fnalizel mehod becau
IbehaviOur e.
we
Can'tR7Cept exát
Handing vs buceing an Beception

huiommended to hanedeencaphor
hiqhy
Baramfhe cocle ohith may se

eIcaphon called "ty wole"


e
hae to plae ise the

ty block apondin hand


the Cateh blou..
Syntaz

aslilathXXXX, e)r
Page 88
Page No.:
Date:! 1202

thsoo
Thi
encapin obe manaly and ornn fum to
handle the excophfon.

public kahe votd man (ShoingCIap)


Sopln (iolo)i

|e the fum wt
qeneat an
"Ats Dce pion Callec
AthmetieEcephon" ínte mainl) ú
handling it wl R
handoen the 'condgOR to om,
AVm
wu handownto DEH to dem
erephion object dtail, fhough prunttarThau)

pubie
throu ne Atth metc
Fo phon ("by Zeo)

He the
Page 89
Page No.:
Date: 1202

AGthmetc Exeephon, and fhi eCeption Obje wi


ou
be deteqoted to JuM, qn" sli hard he
to
Oatxe ption Hordler toclup
Thace IoDaon
the exception 1onmaon
().
ditaili thocough
ppitstak
nokayusono Mainy weol to thno an
lestomiscd erceptton not fon pracdajpned
eRCeptton.

eg. las Ted


Stae Arthneh Excepion e= neo AuthmateEncepho)
puble static vod main

thro

Outpit- E7cephon in thruad "main Toue, lanj


Ay-othmetcEzcept'on

tatemes
Comple tíme neehable
8tasemert

public otd man ( Sminy CJ.Qna)

tho nu As thretiEcaptfon l'L by Tero)


Page 90
Page No.:
Date: 1202

Compi Tim Bruon


Ungehahe, tesemet
Sopln"heuo');

Car kayusord Oy fon Thzue


we get a
tone
wi copiea
saying íntonapatibl type
Compik Time frorom
tound Tes3
"quincoi: fauo. lang. Throsable

HhouA tetement
theia honc
Bhousd
checked"eetion fhen uie
thoows hande Cath
COmpilo
Compi Cho
Unauported erception (avo:1anyDatopto
àcephon,
be
mt
fhon

the
Try Cateh
throws
Page 91
Page No.:.
Date: 202

ead. sleeplsoDo),
Thneec
CatehlTtevuptd En capton ie)

|Output- Compeley and uccnuly


keeyuono
2-wing thous
pustie static void main( Sireiat] ans) toy
Dherypted Excepthon
Thnad sAeep (So0))

Quputt compile, and bucceshsly teen.


we Keywonol celegat
to the
(an thow handing to fha
Cale method.
method
handing erception
D Page 92
Page No.:
Date:22/2023

Coletfon
a
indsuidua singk uni the.
we need to go tom cole tion:

Coleton 1,

neaseae
hey qOWable in natue we

and douen)
2 they can hald boh hetrogertous and
hormoqeneosdata element2
3. Euoy Colectton
Bore btandad datai shutwe
methocls awailable.
Q. wch One Arrays and
Colechionyl
parjo Mmante
Apoed,becan
ArSayü kanguage Aevel concept (meme
high)
Colletion APT wue
Lwelmeme
food, pfotmania
Coleetion ftoeort can be
Qnd
a
ntejata,ohch
weo to nepasent qrdup acliviclual
aa singe entty, then iue
Coeionfhamw 0k
Hoogenow Sami tye date Page 93
dataPage No.:
togenoun Date:2.)2023

Coletin

Memoy wim not 2


-ded

3:|ronrnanes wln QOnmende 3. Petomans wtse


to we not u

to we.
ommende
. (anhold both
homgenous an hatesuoen
D
can holdboth pri mitiv
-ous obet
5 Dt
values Qnd
capable
obe holding onty
pimie obs not

6. ú not implemented using


Ony btand ad data &thuc,8tendaddata
mace dutu
Teady made metho

e,ínHOhu requirament
Complas prognam. complIn

Collection Hierarchy
Iterable

Collection

List Queue Set

PriorityQueue HashSet
ArrayList
Deque LinkedHashSet
LinkedList
Interface
Vector ArrayDeque SortedSet Class

extends
Stack TreeSet implements
Page 94
Page No.:
Date:22/ 2023

Analist
Dasa Strute :gnoable Aoay Size ahee AD
2 Duplicaty aliowcd thseoyh ndex
astealeowe
Obceti aste aOwee
Henfnsoion ao pomib
Consiructo
Asaylet Aoayat0;
The above ineYeates empty Aroayit
with th Capacy o O.

a
A1aylist
t The above ine eates
he the
)
Asoylist (Coe ction

obyet bad On the Covetion


obt
andchen not
o
when to wse
Anayiat
opatation ewb Dpr'ation" be cau
tt ímelenen Random Accen Dnteyae
Page 95
Page No.:.
Date:23/12023

the uJ0r horco


Oporation fn th
mony opraion. T0
10 esowe the
0
sht
we
Ahoued
Quoblet
Lfnkec

ernoy manageMeAt don


wOk uth inkedLet
memoty A
not qiwen in
continus ashion.
D

Heterogenos obyete ase


i: Doutoly linkad lir
allouueo

deplcata

fasetion
dileion hen uwe neeol to

inkedi the
Opaation Opeation.
Contuttons

empty nkedi obet.


Page 96
Page No..:
Date:24 (42023

Linged
la> hee Linkec in Cole tion ();

tTo cOrwut 10
Lnked it

5Aoay Deque

The Aray Dequ las inmplument he


Deque Tntdyau

ww the Dequ, Uni


beaea, quue, we Can add o delet the
elimenti nom both he ends
Aooybuau tase han ArHCuylir and
Ste ck and ha no apaty etiionn.

Dobee eroed Qe
Thin that
gnows Cn d. alloss
elemo fom both ioles

The Poonty Que la


Queia Dnta
hold the elenent dbyect whin an
Page 97
Page No.:
Date:2 57 (U202
3

to be po temed by thei pionits, Piont


vales

oy hormoznou cdasa.

jmmheap daa

Pnioniyuus
a.add(Io0);

(S
()
-Outputl 2S, So, 5, (00,125, 50,
1S
\O0,5O,0,2s 125,1

outpu 25, s0, (2s, (00, 5, I5O, 1


Page 98
Page No.:.
Date:S (2202 3_
-
5. Theeset
Undanlyíng Data
duplie not
not aOweol

Huoenous element not po^si bla,


Ex aptton',
fasetion poi bla On ce.
nplement Seiaizable and clNealali
fntaco, but not Random Acces.:*s
Al iseted baed on
Aonting omode
Ond' Onustomied
Borti Ohcley

Construton ne
ee Set t T9eses )

on
AU obcta wtl befnte bared
borre auti natusali

TheSett TnerserC comparatOn)

inseteo based
wstomized sontíng

et
t
child
we want
fndividua Oejecti
whene Dupl'iatis age Not AReow

hsein U
not presweol then we
Page 99
Page No.:
Date:24J22023

shoud Set
Set doesn't
Jtoaa
Ond Henca
doesn't
hae to
otain
On
Cole tion
întyace mohoc.
HashSt
Dupiaa not allowecl
add it not
hash would hetwn
2 Intn Data Stucts HashTal)
3 pstbee
dataelement (an beacdeol
5
guent opiation beanh, then
the but choUu Hashsest

neo cloneeolo bu
not hanolon Q
cces.

Onstutors
Hashst S

NOte
he
Hashs URtcd.
Page 100
Page No.:
Date:26, N2023

Snked Hashset
"HayhSet".
Data St4 twLe Hash Taolet einead lit
Duplicats i not albwe
Tnseion ondM preowd

cotutou Cunol
nethod which ase
pat be
a
pat o

Hashsetc Linked Hasset


lhdotying Data Sttucue
a
da ta Statu
"Hashrab' combination
"Hashteble t Bntediit:
2hyeton Ondoru not 2-Tryetíon
Pruseura.

The 2
ws0S Java
we One
by One fom
thei CoLetion heiwe hDld go fo

there

Enunaton
3-
LitLoato
Page 101
Page No.:
Date:2&I2/202_.
1
Enumaton
get One
Obetts
Ohe hom the Corectton.
We
Can eat Eeumetatíon Obe
element).
q- tunetíon ey.elementO;
meho da

pubic berlean hasMonoFlement();- This hthsel


tta hthen nes elementment awaileble
and not hen it hetsN alse
ea
Emehatton e V
eement C);

while.hasmo Elemt)
Trte qun i: Chtqen)e.notEleme

pualic, Obeet netEemint ()i Thi uneion


nom the kint

Lintafons Enuwation
Erunation Conept fppicabee Ony to
Leqay lanes and it Not aa Univeb
Cušson.

ennation Can Pesorn Rad


Page 102
Page No.:
Date:28 (2202 3

Opnation Ond we
nt
can't Pofom Remove
Optaion.

3 it teNator
Tteaton
by using itttora Can ove Ehe
he OH to the Bacwad
Dietion i.e,t üa BiDiu iona

Aole
B ing LitTtat0n
Addsion e Ne
we
Can toptom
doget and eplacnig
exiting Obyecto Ln Ad&ton toRad
RemaOpezatioM.
We (an eat
est ato().

taton fhe
pblie bookean hasNext

C
pubic int nextnclex()
d pubtic beokean hassoatou)
Page 103
Page No.:
Date:.28/12/2023

•lic int preuiouu hdel)


9pblic woid
temovel)
h
pilliNoidscoobyKsne)
pubtic voLCl addolaect nu
lanes
that
o
wehe fnceudeol in the veyioy
t Tava and hae Aince beenpiaacd

ace wwas
intey that wsed tothaweue coleetion
btone the inttoduction the TteIeton

The Legary lasen ane Díoíonasy, Hashialse,


Stae and vetr. he
fnteya thee Enumenation fntenac
Page 104
Page No.:
Date: 2 (22023_

fnolicual
obeet s
pais then
need
a
a4
ctd intaca Coltero.
Both Keyo andValey
and
Dupat Keys not
aoe out va lees
allowe.
key- valu pai "Ent "

Map Lnteyace
Contaum Com non
fon au the împlamentation Map Oby ct

b
k gaua)
RT g(ober
boolean Contau
4bholean
booiean
oravaluelibyer valus)
iaEmpy
Sire C)
Nold dearl)

Set kys t-C)


kCoe values
Íon )
L
St endy Set )
Page 105
Page No.:_
Date:28/ 2/2023

Eaun ky-value pah ù


caued Ertry
Map
2 |Thteyaeenty
idetlae Mapt
fntenato entty

Map
Hisantht
Map Hierarchy
Map Interface
<cinterface>>

<<interface>>
SortedMap

<<interface> >
Hashtable HashMap
NavigableMap

----) implements
LinkedHashMap TreeMap
extends
Page 106
Page No..
3
Date:281 |2/202

Hashmap
A Undaeying DataStrutwu ? Hashtalsee
not peead
fetion
dupliat kays not alowe
dupllca
Huteroqenols Obyeet
ietion o
kys allowee ONy one,
but ton vals lan be any no.
implemetation inteYae Sesialiyalale, Clorialble.

Hashrla Hash Tabie


.A the thods A
th methocs
not ynthsonised Synchseonigd
a
At
tim melfle l2. At a
tnecan Only on

thsuads Can opat nthoed besata


On an
Thouadioge

3. Potosemane 3.

alloweol à bQth not allowed


both ksup ko both Keys and alee,
and Valies.

NullPoten Excephon.
5Ttoduced in (:2V 5. Tntodluced
Note a non Sqnchrontgd
Hash Map
we
ne to use Aynchonizeal Mep)oletion
Page 107

Ospr% Page No.:.


Date:29L 1212023

Constutons
Hashmep)

2 Hashlap hmanuo Hauttplnt capaiy


Hashap hm a Hashmap lft epacitt ot Ihattra
4. 4ashmap hm n
Hashmap(Map m)

tuithe chA clan Hashmap


ollDsing

Hahmap inKdfashap
oncdeing data 1:
Undeslins data
Hasaole
2- heion Dndes NOt 2 Drsetion
pheseuwed.

3 Ttoueed in 3.
Cntodcod in

SoTed map
we
went n
Ecy
and soted ftcea
Sorted map
Page 108
Page No.:
Date:922023

Sortedmap daine Apecfo mehod

b.
Cbyt Lastkuy)
Key)
Sonsedmap headmapl obce
Sooted Map toil Map(Olyeet kay)

4 CompaHCIOH comparoton)
Dol
Nauiqable Mep

dafnes Seveal methot tom Nawsgaton


puposa
theeMap
Undering data siuctua
2 Duplta
Vaey
keuys
ae not allowed,whestes

bad onbome Borting oncden.

dpendhg on nattal
homo qenous
be

Thentho oyshould anof


Page 109
Page No.:
Date:2 12/2023

anlast Besption
on
5. custoisation hough
ompasator, then thox Keys can be
heteogenou and it (an be
Nonompasable.

lo-NO testti tions on vauiesH Can be


hetoogenoe Non Conpatalole alo.

E HashTable
the nd data Hauhtas
Stucre kom

dupated.

Boued on auheoce

ei alloweol
and Vale.

Mull pšut Ercaption.

Pimplemett Sesialiable anol Conealsle, but


not Random Accey b
Page 110
Page No.:.
Date:29 |22023

method pret in
tauhetu
tashaee
Synchonizecd and hashtabee obe Thsead
bet when we
with
Search Oporotion.
Page 111
Page No. :_2
Date:30/|2023

Gtenescs

The
phovide Typesaety
2

10soue

A
f quatantee can be povidad bowd
bad on fhe typ
elenety.
out proqamnming geqiumeat is to holel
(an hooe
we are tng to ad
anothe
Tne Eron:

s[o'" clhon";
SJ"Sahin"
st2] Thtega (19)
)compi t40m
CEi-inOMpatibo tyges foune 3fava. lang. înteage

quatantee that whet


yee demnt hence
saye to
No t'n ewn heneic
tye paAanetes. thas tholwePage 112
Ihe Page No.:
Date:o2023.

Aali
L.add ('
dhon";
T.add ("sochin)
Tadd (neu) Thoeqyrl
l)
Stntng si(sning). qtto);
Stang s - Stsimgl
( qet)}
Sising s3 (tringjr ), | Runlemw
Grcs
RE CaaslarExeeption
for oletion, ue (an't quaratee the
elenent peset i coUeeoion
we

then ChoO Araylit by mitake


to trying to ad any other type o
toon't qU any ComptuTime Eroo,
bu the prognam may ael at ntns
Note

notr typesa
prouide gAaankee h fhe
Dheeas oliethoN
hola on'
quanantce fom he tyee e elemot
Neea

to knowithoi
nom i we don't the
the beginning, bug
we Want to poviote tyee
Page 113
Page No.: :
Date: OL
1204

ing we
ned alog
with

LCase 23

Arorayl T
add ("Sahin

Shyin names (Shuing) -4u+lo),


lating
with ColleiCN

to
whih prouicla
and toResolue Tpe Cousti poeobl
Q. Hou u
poicod in
Genei Qnd
how itt
yeioie the pooblomy
Page 114
Page No.:
volue Date:05LO20234

Ql= new Atoauy


Aroay lt +0; on-GuenL

|5GenC Ageaylist uwhich hololi onei Stung

al. add("Sahn
ai. acld"Uinat
Qt.
add (neu Lnseqen (io)); ||compie Ero
not equn

We
lan (ea
lan GenKT

puolic GunlT ob) IConscHOm


thi oljs ob
Page 115
Page No.A
Date:0F) OV2024

pueie Tqth0 |Getor

pubtic ceaeiGun
public staie void main(sthingc]
asls

Syiem.Qu.pintln (g9obj();

The

Aroplis non Anoali


Vesion
won't prouide as we
an
elemet
element
13 2. Page 116
Page No.:
.
Date:4202

pravicu Oy
wánwe can add

gehunodken'
not
element.i)
Concleon1
AvoaylesKShsng
itstoing>02

CESinrypattble tyg kane Arayit<Staig)

|Polymonphism
Tpe but not the pananetn type

Polyncphiay 6 wSage panent rejesrene to

Concuion 2

Inot appcalble fon pumie tyes

Šuquined efrone
be claslinteiael
poimiie
Compil time eUON.
Page 117
Page No..:
Sp
Date:0/O2024
A

Q
botlean add obpet o) e
bl boolean addA(coleetion )9
booleanemove Lobet
dboolean aarnoue Ae (Couetion
C)

elouct
q:
boolean hetain ARCoelection exceet hin
cl
C>
Shald
loeenouoA o)
beolean Contaiu lobect
boaiean iutmpt)

reeraton teonaton() ubison need to


tenatz
the coLlesion
obct
ote which implementi
Coleeton intoae linactly
CompanatoA

2
abna mtho.
pubtic aksta it Lopasi (obeer ol
Page 118
Page No..:
Date:8 042024

(b paubb'e abstno beolan eques (cbt o)

hes to (ome
Cquas.

fgplment on ompaatos
w
Comps0ily shousod gie bocy
Kompae).
w
5 ohecea fon cquals, get ths bocly hon

Uos y
Compataon fnplement, lonpaaoa

(omparable )
ang-paua
o
pubti int ongpaseTo (obker
3.
OljCompae Toloby2) to
(oe beone obj2
Ob1 has
tu tve yi eb hay to come r
loothare Kqal
Page 119

Page No.:.
4
Date:08o202

Compastable2
Conap0942To
the natal

LoMparatOgl
(ompanl)

Companehie nafae

2.nd Cateqoy(Puclefae d
Noncompatable aws

3.
StucenNuromi)
Person oho wtgthis clas'ari
jspolbls
to pormote atural sotny Oxc)
OAde)

who
Page 120

Page No.:.
Date:08 D7202 4

in his Qon natustal


ementing Conmpaato, fatya
Conmpaoable
clyaet
Compaat0s
natual' ho
pacag
2
mehooly
toMpne.To)

Collato ànd Rule Bdhe


COl atohbr B
Ap)
Jana.io paa ontair
pouag Page 121
and eutpu opaatiom f a
phogiam nor ap:be
Date8
aoo
Jauand.
2024

handal'g

poocuee th
to
Qutpt.
oes
ihe cn2ut al
Jara the conee
conupt a
Stream to mare

The
ganfo Packag conta
SpationN:

npt Stuan
The Inputstteem Cas the faua.
a
nept
1

edd lata.

package
ostna Bupeiclo thar apst
Page 122
Page No.:_
Date:08 /D2022.
ton bo o
yit dota.

wheth th abetr le
auailal not
o
availabl hen
tha

psumain (taing Cjanga) thsoe Fxcepkon

So pen
(enin)); Lfae
4-oeatrusfe ();louats flo naeel with
uiarte

a
aso.

lowat a nus dNeOAy

Notf
baidd onUNI ols
enenave also
Page 123

Page No..:
Date- ,o4202 4

tpruet boh
Obyeet ony
no

a cti uy
fon ( Stcin nane? ston)

Sopln (nam)
Sopenl"

leates a
(awa. Rle obyo that

F
(Stig tibdin name, shgi nam);
Oby hatipenenei the
name
the
Page 124
Page No.:

Date:•9/42024

Ceno.f");

|Lpostant methocu

beolean eaits ();?


booan eatiNwf();
3
bowlean ufle ();
boolan
b: Stoing L) Lit();

bonlebn deltil);n

chasact' dota to the Flo:

RAwstea tw=w Rletu ()


fw. ri(shubhom');
Wnite 6

ftte Cotuts
neo
hz Flt (St9ing nam);
Page 125
Page No.:
Date:0]/0t2024

a-met
the data. to the le.
Ovd
tad we

hy he Alewty(stn name, booa


Flaunituh

Mthod
t uad ();– trpt to ead he

Dhasat he adtulnt
awallalele heh
w

we
gi t =
8.uad ();
2 t tead (Chac a)-t attmgts gead
and (haQHUy

Chasth hauo
hait) Rength0;
Page 126

Page No..:
Date:O, Ot2024

hE(i!=1)
Sop( i+--);
Sopln((hoa) )

elid
whil witth data. by
fLsiitu compuLsOy we

a bigges heaolaeke to he poiognae


2

Charate by Line by
lin
by
3 To
Ovaone fhese Lintafoy Bhoul

we
By
i obet

Constwto
bw
=
ew Byied siton(wtt w);

lbuoiadwsita bw =ne
Page 127
Page No.:
Date:D/ 0t2024

pw.txt)

boJava),
bawsitt
Bw.nwLiel)
bus
wit ("Shubham")

Sihiny lena=b.huad Linil)j

Praritu
This
text
data the fle.
FUWtig and
chaat lata to fha

b Ratitutb
ata fhe
Page 128
o Page No.:_
Date:j0 0t2024

Antytupnuw BettDnitunlstouy na)

Fluty neu) folusitu(;


Rntitu "po

Sesializetion
The the an
tati
buls

an
ormt eithes etobuppotd fo&oa (o)

HuatputSuam
.

impomt o. Hlaletput
Stia
fmgon yaua.b. Sodagablei
las csúcketey inplemert SeuazeAle
NDto matp intya
Page No.:_
Page 129

Date:(2 /04/2024

privat t a

name, i age, iat tue

hi.namenaej

thins

pb'c clas Lauhso

OC,-
sh)

obu

Buon
buyt
bauialyconwat
b
aol sowetheh. a
Seeliied obyt sn'
(9n't
undtood by nORma human.
Page 130
Page No.:
Date: /0202y.
-
beSa
The process
žaton
The poCes huaciny th tat c

an obai {hom
hom R
Appostd koadh lo) netuo

pbC cla launsD


psvmair) thocouws Fxupton

hae not keete Obyec oA

prognam acy
hae bnheaed wi

Inesient keywonc;
the
anc methoo,
Page 131
Page No.:_
Date:920202 L4

Mu cortat
tha valale ith he

At the tim
hhanent
the -Nae tD tha

u
211
That mea
thaien
MoUazation'
Page 132
Date
ISo/24
Page

Datt and Time' APL ín


.
fava,

Java .e, Jöda,-Tine APL.


This AR
devlopd oda.og anol
n
avlable Java Th
aNa. tne "pakage

Dat and Tin

mpot Java.tin. *j
puubbe Cass Dattime

Lolalbati Bt,= Loal Date. nowl)


Sopln (Dati);

=
LocalTime time Lotal Tine.now)
Sopln tih)

|Dutput
2024-07-15
14-0s:3+.692

ava- utd. Dat vàavasge. Dat,

psyml)Rnl
awa.ut Dat dat= n.til. bat();e
Sopen ldat);
Page 133
Date 1So+|24
Page

Long l= utubate ge+Tne0:


Sopealsqldat);

19 8:33 TST 20 24
202407-lS

dawa. util.at gawa.sql- Dats

to
utily
handle DatrU in to honla Date w.t
lay
DB
PåoAanmi opratiors
(a) t hupisents bot
Dat hd Tim dato, butnot Tine.

Timestamp =) atr ard Tine Valeit

API Jaa CPA,


o poces obyt is g
he coleion, in -8v
ionept toliced
een b/
Java. utiu. stuay and Java.fo
Page 134

Date
Page
Isožh4
obecta om the.
the e,
coleion. hiuptesent,
cOleton. be
mean
binasy and chasacey daaf th espes
a
Tupseti 614an
&ata os Chasactry data om afl
Dehene bo colicton and staam
|gwe Unt to heseset a
qhoup
hould cOletiog.us)

watto poce a
qhoup q
tbti
om the oeection
hene
henwe outd

we
aicolelion ihr
(hn
data

s19LcanData =Lit. heam();


$1huam Data fonEac ( Sopln));
Page 135
Date
Page

*Steam

We o by co
2
Canpown the in
phares
onfsation

map yn
cantnm
chdniyn.

we congu
hom he iolichon bdd 'on sóme eolen
inethod

>
hee Bedicat ) (gn be Qboolan
valued hnton (Rambole ezpresíon

Stheom S= CStan)
(

He we he
hum
Page 136
Date _1s(oa 4
Page

Rena to
aKana Keteelemennt
we
on &0me boolan (ortion ho
oh ku) method

wewantto at a
ober
onpuy qeqiemat then
coletioo based
4o oi map) mthod Streen
Enteao.
funtion
can b
lambca pumon also.r
Ceqi SteamS=C-StHeann)j
Steuam SI= S. mapli itio)}
Once we potohm Cofqwnation
by uyn hual metht.
2
Prcesing.
(olle)Thii method collict thi lement hom
hes
&tLamau asl th ece to the

bpii)
tOMeonindiatd epijid) by asrgument

element pesent v
the tam
Page 137
Date IS o|24.
Page
n
Soteame'ho 3– the &O9iy ethes
to nette notual 80nng.
utomiz
CompaafOA.
A0Hed().

minC) and 'mal nmethodi


in (Dpasotos ) twm nmenvete
man aninn.valus.
Lompaoo, )–hut
-htusy

kos EachCmethod- Thiimhod sheake


bmba epunion a9gume a

pesent in thes stQam.

nethoco COPy
ato specfed Attay
).

S= SAeam. (A991);
Each (Sopn);

Doulale 3
d= <I0. O, la I, l0.2, (03;
Stoeam,
Si. fan (Bopen)
Page 138
jawo. ong
Date 1s|o+24
Page

Enun
naned tonstent
eum Month

JAN, FEB, MAR-.DEC

Euen conupt
we Can
wch alio come

olen compagedl t old anguaes, ene Jaua's

Dhtina imlemetion of
nun

REO,BWE, GReEN

Rublie statc

clan conep.
Page 139

Date
Page
Is/o24

vâsuae en t that nm
Evouy COta
Stat'c fna
gty anal qtte

enn Reut
VPAS S,PATLY NR;
tmarus
Rentt)

Betases(itmasu)

tn maes

Clas launehEem
Page 140
Date
Page
so/24
itm= PertASS. qtmares
SogLn (mi) ;

he no. 9
Contant u
fn

in above ole fhoe tin


daened (PASS, FATL, NR) Hen thoee tema tonsuue
ca
e.
Annottlon
Th Jawa, an annotion a
tyee qr eadaecot
Vla,'mehoe,
ld, paamts, elemet
L.anm
Provid additiona! itomatio abo the lemes

Annotatigns au ud by the Compttes hutin


ond otfua teoly togenssatt cot, Ruohm Ntine
Chotks, ano povi cle doumentation and they
yomation.

ollae by fhe nQme the ainofelion


teke paaahees thas
cnd Con
ma
adolotbna in tion.
Page 141

Date 15/0+/24,
Page

annotation

hia annotetion Und to


niatt tha methO in las
to OvGccea nethod
bbla
Thin annotation iswied
elemet(hrch as
method or' cea) ue
longes eio mnwded fo
may be 4emoed utur
Page 142

Date
Page
1024
8The annotafion wedfo
as
the
Nava (ompilis, such nhicked

annotation
ndiatr that an ateryaa u ntencled to be a

luntional inteae, ohih mean Uhas a

method an canhe ed
with lambda RpOMion
Rxpresionu.

&va Rton: Thü annofation

poy be
an anotation nElatla
qtaied
hethes it
Shold
(Ompilattn.
ví @Dounete Thi annoteton
fndicatr tha an hod
annotetion be
Inelded in araDo doumenation.

anotahionCQun Qn be

Vi to
Lnkositd 1has anototionsú ed
8ndatecd hatn Qnota ton houle be
Page 143
Date 6fot2y
Page

inhisted by Onafettol

ustom Annoatio

Custon Brnotasi
Lhane,

mpost ua. lang annotation. *

@
Tgt Eementtype TYPE, ELemantType. Method)
RUNTIe )

in Jaya
letion APT io

lndand nolikJawa a clases, elds,nthooy


has e
costloos hutin.Jaua
class namec clas that Collect
Stoes tomation cbo Ca
the abtecty
Page 144

Date 16ot.
)Page

the obyt
you coont

Thieion oUass btomotion

an
Page 145

Date_23/09 /29
Page

AtinyIPee
u a

he conUp
These
ae to
Yoce bac Mutftin
Thoead Baed Muiari
Procs Beed Meh tayLig Ereuticg
epanatG indeeSdo poces
uh
Beocess metftery
Cocin
maet Note

NOte ou nettasming bet


bttd
Page 146
Date 23/024
Page

Thead ead MutitaHgn3


Ereeutin
eveatek Aepotiat fndapuner
past

*|Thi
"Proghammatic Leee"
Some Impotu poít
The main to
heducs the gespomu Dtne the
byotemad iko
inproe the tonmanle
O
he main impotat applcatio
mutfthaeading
GTo fnplementmltimecia qhephies
b To
1o donelop
olop
web
widen
appliatbn sws
ava povi fnbut seppont to
withbhsead thsiouyh
Runnasle Thtead Guoup, Threadloal
Page 147

Date D3/o|24
Page

what thoeti

called"Single Thtead pogaammg


fon ey thtead thereue be a
spatatr ob

The asetuoo ays t thsoac


mplemetig Reunnable Intoace
thad las
1iad Schecule
to
eIeett hen which Hhead'b ete
cleicled Thod. schecleles

T-&têsul

Kepaneta
hsead loe hethe The
fmethod
methool
(alledar
Dy main 'meth
e a
method.
Page 148

Date
Page
03lo/2
pontance Thieac Class taU)mhocl
FO theao, ilquihic mandatoy
thgiaad
tha
e
hea schedley ftLe
tafen (ae bg
by
had lan
Slat) method and the
fhe

haad iicle quin)method.


stast ats iee an asitance
0

pogaMme
Stert

Stest()
hegitn thoeed with Thahecule
AU othes mandotoy low d ausithey

statig
Page 149

Date 0So&/'
Page

Thyua thoea class


b

Uass Dio

Clas Calc ertendo had


. pubb'o vod uny

( Clas nes agei extenol Thead


pusto vord unly

pubte cla auneh


pavmain
Page 150
Date O5lo6hy
osloa4
1
Page
ne
Mesae t=
ti tY(0;
t2 8tart ():

plsi vord n)

Cas mna inplomerts Rineble

pubu'clam Launeh
psvmain)e
funeele Page 151

qea' otpatecs o8h4


Page

lalc Ci= nluw Calct)}


Pemag

hsea ti= Thua (c);


Thscead t ne Thyead (me);
to
we altnC)me

Nott
Bet appoach a Inplemetg guenabte
fntoyaco As t (an enten someoth
(lashon eqeeied.

mofanplernant,
Clas alc extenls Demo Rumaste

Thead

smallt paat the fhat los a


Page 152
Date 06/0|24
Page

Ovedoaing unl) methot


we Can
ouad fe unt) mithod b
Thuad
with
las
with

argumsn bad tun metho and

be eneted

*L ye a Thauad

eRurnicg

thouad entd Ento Running Sat


cOmplitd by thead
thad ented into i da tet
Page 153

Date O6/o8 ly
Page

hee we Thgead fhenhe

bon Ate
(ae stet) ethod, then th

lnnale stet
Thead schular allotaey CPU. then
thead
teto
Once the tunl) method ovpltes then fhe

mythsead

neu Bosun stot


fnplements Runabe|

pubtíc vofd gun )

LoRd(Ja
Thad. slesp (30oo);
Careh (ExCLphion e)
Page 154
Date D& o8|24
Page

Sopln (" Ched thead task complind

Peblic Claw Launch

Sopea(C Maên Thsuo Start°);


nou Deno;
Demo l=
Thuad t=neo Theodl (d);
teti

Vaouy Coto QnaiSlfaThal

Thsead t- neu Thsead Rnable s)


Thsoad t he
Thad (Sting name)

Names
narne
nane
t sathome(" ALPHA"):
eqi
Page 155

Date
Page,
04ol
hsead loos'tfes
en
fhea fava, has orm

AegnentExcsption)
lheead. MIN_PKLORTTY =|
Theceas. MAX_PReoRLTY= (0
Thsoo. NDRMPReORTY= 5
bohthe hse ady houe the8ame slosetty
POam
cuptndnt.

Dyault bosity The youutipory


main head "S" whsUey
thseaoa peority
paten to chilg.

CAAdThocead frioritA
Page 156
Date 09 lo& 24
Page

we on
an phewent thad by eneerion Be

hanc the 8ane

en the
Tealy hauei lau puolty
Thea an tont t eC&tion
and
Chance we ant enpt, t deperd
On thidshscludel.
leedoken
th hance onte agath depn

the thad hos to wat ii th her fhsea


t Retion then ue nec to 90 (OR

ereutes t2-ial) th
ention
Page 157

Date q o82g
Page

OSlep)
optation foa a parlas ameu fm
thin heid

Excoption, wkfeh a chuckad encaptfon bo we


Shold complso9dly handle the eRLephn
by thsioey kyuoro
Chuoh
othd weuld

ktett thgiad
9uadny|wnasl &tate:2 )

Synchoorízation

Synhonize
mtthods
Q

d eepaassc
mthod bloK
then
thscead tan ere
exelcte that method |bok on
thar oby

Th
manCd.qesoeuee
ola'ta intosjieny
Page 158

Date 09lo® 24
Page

ence Spc qutsumnt then

Shononi zaon concpt a


inplemnt

Nott8 tuoy oby wteo


haue aua?
updat, ot lelot
Dny to
aha writi the(ode
kelecgiopatfon.
cla Reseuation Appi

Synchoonszed beORTLEt()
Lptom updat epaton

Cas Lev loK


as a

a'tuad wat toex


Page 159

Date 09 ko8l24
Page

thod hen

wlâu a
theadmetho
eneeuting ay statc
BynasONgo t genag
Mati c yntksontyd

to eui nomal synchseonizd methoc,


noml itatíc mithods, andnomal
ftanee metho Kimtaneusy

Dtieen thee ho.


lDead 2locK
D
1hsa
oewes (thaterd)
"situason ae ceead

peton lauoidan)
ponislo

Synchseonzad
Kence hene
Page 160

Date 23 oa]24
Page

Uwe
hoy to taro
Spelal Cas
DeadloLK Va Stasation
Long watt

a
thood,oke voati ends
a
atan pott u
Called"SHaswaon:
NOt i Low pooty tha has to
wt itil
a
cain hOthig bs
tawation
Dacmon Thsuals
he thouad wwlich exeeing in th
egi Aftach ten Sgnel Dapatth, hesbag

Main Obyetc o4 Daemon ThLead.


e
objectid Daemon to
h
mah Thoiadi
provica hkeort Non-aenon Thead
hun with onenothoeal
Page 161

Date24/o0l2
Page

wletheg the Thoaad ü

Daemn NOT?
pubtic boolean aDacmon()
what û De
Natue,

Ds
it pon?bl to chans th Won Damon
nat odmai thsead
fhceQ

Houw to op a
f opl) Thi hethod

ito Q

dead et.

t Thee ad Commucatôn

bnotiA)
wait)
Page 162

Datyloo24
Page.

thead wie
wih A
Xeton wtth te updard iem.
Thsead ohch
updatton Asuld call woat), lniotily
the Thsad a

To ma
yA):-Theead. gie nooketon fo

You might also like