Java Full
Java Full
Java Full
hana:
Name.: Shuabkam
I NDZ
Phafapab' Sub.:
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
lache:
Supnlonnputen
Maunlname COmpuwt
Mioo Computo )
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
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
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)
lases
Etc
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;
Loep
do
Page 10
Page No.:
Date:2O2
Patten fyitg
*
Page 11
Page No.:
Date: I202
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
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
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
wonein
P P
PC3
e
DVes Git, Mehelal Dorey
Bazas
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
Rt tatus Commnd
Thi ieed to
Ccheek the status o theo 0kA
dinetor
Syntax
Page 16
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
To
oÁ t- bManch -M main
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
qt bnanch DM nain
peuh
Case
qTenoto
2
ald-
Tupo0
qt bnaneh M m
Ogin main
Page 19
Page No.
Date: 1202
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
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
useto
ternpoaaly stoes
stous a
al the
the modiied
tnackid lei
qt stash 1yed to estotu
fhe mOst bteshec ils.
ale the btaheo hanges
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
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
vasiables
(an to yonoeb
neu
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
Page No.:
Date: 1202
(a fnstena
Vasabl
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
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
Page No...
Date:. 11202
paxage Called
dto
coltetion
Sting fuwo t
Tho, age
Tmnutabl
) Mutable Storing Once we res Q
"Mutable
n PageNo. :.
inmtabee Shohy Date:. 1202
o
eati equivalert SÁoig olet
Shying senu Sheig chan
charate anay
ne [J6)
Page 32
Date:Wi202
*sttng si "shubham"
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.
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
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
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
acldes addses;
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
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
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
but inhalisatíon
Rules ton Consdueto
bgea No fhe oututon ton nd none
4
the, cas me
be the óae.
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
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
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
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
static BeosI sd to
iíaiz
steic
ksfo h
iman methodat the tn
eXeto
Lohen tho gtloadal
UassLoading
foto the JmlJawa Uižtuel Pmahin)
Page 45
Page No..
Date: 1202
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
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
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
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.
Tnheitanca
Singke level inhettance -Only one
de ived nom fhe panen clas
Ctenc
las B
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
Llas B
ertenc A
Page 52
Page No.:
Date:. 202
are
Apeihe tothe portietan
Caed SpeeiatizeQ method "
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
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
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")
pat
So pen( "m-B
5 s
khe method
ies metho d
ofhewt thi comnpia we
en.
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
ethod QveloRoli ng
an abkhna clan
abstrat methoda. towevey may
CONen non- absta methody
* he method dodased fth
Page 58
Page No.:.
Date: 202
Enployee
Anal clas
a
)
las mad as inal, thnt las
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
Seatd.
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
frteyau Coompten
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
mehod moc'u
alosttat clas wasiabl
estsion: onabt lo
vagiable modifi.
Page 62
Page No.:
Date: 1202
Coytcton.
we ae clo clasug
not folouoi ag modiuu, Privat, protetd
tanstent, olati!
Page 63
Page No.:
Date: 1202
ttetiabln (mp we
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
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
Rnal nt =0;
public etic t x=(O
Privat
mosif
Volatle
Titeyace Nanning Lonpet
naning onict
ay with 8orme
Qtwo ituy ontaina mthod
gnatue anol tetn
mešhod impleme
ta'on
a
Cotan method th Jam wi
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
inyas Rgr
pbl'ci t method Oneli )
tha
fmpeenets both
intots
awa clss (an
multaneowsly
a mekod
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
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
Jaua 8
featuus
Daloulr rmehocdyi in
SHeoic
2•
mhoci in Dteyac
3.Cunionas Tateyes
Page 70
Page No..:
Date:/ 1202
lay Tet
publie stet'e voi d main(Sting onyo)
f. mt.()}
Page 71
No.!:
CAPage
Date:l 202
void malO
daaut
System out-prstlnmy-a)
1.
Syaemout prúnthnl"Mi-1"J;
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
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
=
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,
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 ();
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
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
Can
91
Nou
olbovemain methocls onte On be
mace hotei by wsegLambda Biposon
void dssvel in
puublie Claks ABC
main
publestei vid
awA)
publievoid doive (is
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
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
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
9
Page 85
Page No.:
Date:. 1202
beouk exctec!
blw
Denc
final
adijapptcabla
nethds and vaable
Q
huiommended to hanedeencaphor
hiqhy
Baramfhe cocle ohith may se
aslilathXXXX, e)r
Page 88
Page No.:
Date:! 1202
thsoo
Thi
encapin obe manaly and ornn fum to
handle the excophfon.
|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
thro
tatemes
Comple tíme neehable
8tasemert
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)
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
e,ínHOhu requirament
Complas prognam. complIn
Collection Hierarchy
Iterable
Collection
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
deplcata
fasetion
dileion hen uwe neeol to
inkedi the
Opaation Opeation.
Contuttons
Linged
la> hee Linkec in Cole tion ();
tTo cOrwut 10
Lnked it
5Aoay Deque
Dobee eroed Qe
Thin that
gnows Cn d. alloss
elemo fom both ioles
oy hormoznou cdasa.
jmmheap daa
Pnioniyuus
a.add(Io0);
(S
()
-Outputl 2S, So, 5, (00,125, 50,
1S
\O0,5O,0,2s 125,1
Construton ne
ee Set t T9eses )
on
AU obcta wtl befnte bared
borre auti natusali
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
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
while.hasmo Elemt)
Trte qun i: Chtqen)e.notEleme
Lintafons Enuwation
Erunation Conept fppicabee Ony to
Leqay lanes and it Not aa Univeb
Cušson.
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
ace wwas
intey that wsed tothaweue coleetion
btone the inttoduction the TteIeton
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)
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.
3. Potosemane 3.
NullPoten Excephon.
5Ttoduced in (:2V 5. Tntodluced
Note a non Sqnchrontgd
Hash Map
we
ne to use Aynchonizeal Mep)oletion
Page 107
Constutons
Hashmep)
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
b.
Cbyt Lastkuy)
Key)
Sonsedmap headmapl obce
Sooted Map toil Map(Olyeet kay)
4 CompaHCIOH comparoton)
Dol
Nauiqable Mep
dpendhg on nattal
homo qenous
be
anlast Besption
on
5. custoisation hough
ompasator, then thox Keys can be
heteogenou and it (an be
Nonompasable.
E HashTable
the nd data Hauhtas
Stucre kom
dupated.
Boued on auheoce
ei alloweol
and Vale.
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
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
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
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
al. add("Sahn
ai. acld"Uinat
Qt.
add (neu Lnseqen (io)); ||compie Ero
not equn
We
lan (ea
lan GenKT
pubtic ceaeiGun
public staie void main(sthingc]
asls
Syiem.Qu.pintln (g9obj();
The
pravicu Oy
wánwe can add
gehunodken'
not
element.i)
Concleon1
AvoaylesKShsng
itstoing>02
|Polymonphism
Tpe but not the pananetn type
Concuion 2
Š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)
2
abna mtho.
pubtic aksta it Lopasi (obeer ol
Page 118
Page No..:
Date:8 042024
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
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
So pen
(enin)); Lfae
4-oeatrusfe ();louats flo naeel with
uiarte
a
aso.
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
bonlebn deltil);n
ftte Cotuts
neo
hz Flt (St9ing nam);
Page 125
Page No.:
Date:0]/0t2024
a-met
the data. to the le.
Ovd
tad we
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
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")
Praritu
This
text
data the fle.
FUWtig and
chaat lata to fha
b Ratitutb
ata fhe
Page 128
o Page No.:_
Date:j0 0t2024
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
hi.namenaej
thins
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
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
mpot Java.tin. *j
puubbe Cass Dattime
=
LocalTime time Lotal Tine.now)
Sopln tih)
|Dutput
2024-07-15
14-0s:3+.692
psyml)Rnl
awa.ut Dat dat= n.til. bat();e
Sopen ldat);
Page 133
Date 1So+|24
Page
19 8:33 TST 20 24
202407-lS
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.
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
*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().
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
Euen conupt
we Can
wch alio come
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
Date 15/0+/24,
Page
annotation
Date
Page
1024
8The annotafion wedfo
as
the
Nava (ompilis, such nhicked
annotation
ndiatr that an ateryaa u ntencled to be a
method an canhe ed
with lambda RpOMion
Rxpresionu.
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,
@
Tgt Eementtype TYPE, ELemantType. Method)
RUNTIe )
in Jaya
letion APT io
Date 16ot.
)Page
the obyt
you coont
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
*|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
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
pogaMme
Stert
Stest()
hegitn thoeed with Thahecule
AU othes mandotoy low d ausithey
statig
Page 149
Date 0So&/'
Page
Uass Dio
plsi vord n)
pubu'clam Launeh
psvmain)e
funeele Page 151
Nott
Bet appoach a Inplemetg guenabte
fntoyaco As t (an enten someoth
(lashon eqeeied.
mofanplernant,
Clas alc extenls Demo Rumaste
Thead
be eneted
*L ye a Thauad
eRurnicg
Date O6/o8 ly
Page
bon Ate
(ae stet) ethod, then th
lnnale stet
Thead schular allotaey CPU. then
thead
teto
Once the tunl) method ovpltes then fhe
mythsead
LoRd(Ja
Thad. slesp (30oo);
Careh (ExCLphion e)
Page 154
Date D& o8|24
Page
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.
CAAdThocead frioritA
Page 156
Date 09 lo& 24
Page
we on
an phewent thad by eneerion Be
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
ereutes t2-ial) th
ention
Page 157
Date q o82g
Page
OSlep)
optation foa a parlas ameu fm
thin heid
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
Synchoonszed beORTLEt()
Lptom updat epaton
Date 09 ko8l24
Page
thod hen
wlâu a
theadmetho
eneeuting ay statc
BynasONgo t genag
Mati c yntksontyd
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
Date24/o0l2
Page
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