Q
Ee
TN Explain exception handltin mechani
——Hcobch thm P Boaly 2 wi
ZN we — =f ==
Diltoste the s, ee -P
at eu
| ho exception fs a prablem thot araeh duxing the
Seerahan aha
EO Pregrcey py
@ Sava_cceeption handling isased to handle enor
A_paDngre syst H i
conditions - in 5
the Necersany aohiso
Bailh-in exception.
° Arithmetic. ereeptian: Authmehc excar such ah division t
ero,
le AvraySndeOutOfBounds Ereephion: Array tndes is act of
hound :
+ Claysn at Found Bephion.
+ Filenlot Gund Freeption: Caused by an attempt fo access
anedistenk File
* 0 eecetHon: Caused by geneal 10 fail, Sach ak inabi Ty
to read froma Gile.. + Nlumnberfarmb Exception Couized_shen a: Canvernion bel :
Pega Ta
A te
niall Peintex Exeepfion: Gused hy welenencing a Null of
| Stings and number fails
—_| f String TadexOutO® Bounds xceplion: Coured edhena_pang noc —
———_ wvpks ta, ponematent character poston
Z iN O-string” :
s QusoEMeman, fi ephon: Caused tahen_thert’s 2of
—— +neugh memory fo allocate ners) ‘Obyeor —___
}*Secuteity Excepti on_Caused when an_applek jmen to ____
—_+_| —pesfoxrh_@n_ackon_not allomed by the brawser's S __
Ccunihy seltiag
tachOve: Ploutazeption: cused when the system rune
our of lack pace
gS] Oske a pmegnaze to inpul_name_an sal of employer
iS Gnd thro “suser clefinect tint ie crtenll along
Hue S-19
=I ink aa, jot
oe NegatveSalony Exception extends Exception A
ot Eee eption.(staing sta)
apex(ste)s
|
i
Public clas St
t
Pate afte oid_maia (string (Largs) ‘thraes Tokacephion
BuPPeredReader brs nes BuPPexd Reader(new Inpubstrer
mReader ystemi a:ip
no. |
iw © |
pth Sy aler, OOF. paint (CE nten home of eroplyge
ming,_names br »eadLlineO)s ————_______
Syst em, Out. pmok(" Eaten saloay af cenplo yee)
Siviyer posae Sct (pier2cddine ()),
tthe “yen Neqahive: Se Bception( Enter! Solas
amoupk is neg
“os Sy stem oak palo,
oe couch _(Nepabive.Salany Exseption_a)
} sopt)i
a
i f
W019 SY WAP dy _creale hao threads one thread coil prank even
S| po. bekween st ta 50 and other eaill_paintadd purnber_bekuee
® Se G0 Dene thread priothy?Wmte dePasilr qricnly
rohue
innpart fava lang
clays Eyen tends Thread
BS
Public_vaicl_wonc).
try
Poe Cint (£25 i<=503 142)
4
Syd em nutpeiniinl” Even thread :"4i)\
5 Tees (S00);Oda \ edends_ Thvead
pe :
public_uaid aun) =
{
vi S. -cutprintin (At add thread:+i);
[eep(So)s
5
ar eeeeplelespion-<)
As op(Todd thread ‘nlertuptedt')>
x e
(
4
4 class Eyenddd
Pulesfae void eoain (String axgsf)
new Lyon O.stan to);
i New Odd ()- staste);
deFy *)
_ Qoit 5 6 '
Senile © Saya Applek te Manta, the
Red calor: iS
| (ote. —2ypta,
wo 3 Explain: Sdvowline, dvawOval , draw Ret den
= 7a :
fom 4N] Give syntax of “hame "value =“value"
| Eanmigste :
K
=
My Applet | Ppplicakiad -
2 SPpolets wan afin ager Applications yn an _stahd alkene
systems
AD Noplers axe fhe smalt 2)Applicabiens os & laxger
F2D@qrond Pog 'Tammer ~
B)Rpplel starts cxccution 3) Application fats execution
baith its UnitG) » 1 with Ms main()
4) Ppplels azo event driven 4) hpplication» axe conbal_clxver
S13 6)iDexcnhe the apple fife cucle, in debi! Cans) -
= |!BRelerws is the derceistian “a b Life cycle __-
|_ method: a
init): The init() methad @is the Fist method to execuhe
when the applete is Grevuted, Vaxiable clalatahon and
(nitiaizahon opexahons axe pexhrmed in this method,ine edalcly flew the inti ome thiod Tr Th alse
jathe—applt
th plete sdlared ,marinized CS moving _
| Prors one tah tb another Jah iA the byawser q
Josbroye) @
idle) ——Woea)
STEM
stop 0) ‘The sinp\) methad ats the caquhan of the
appler oe thea. The sfmp() method execute, chen
the. applet is minimized ars cohen _m wong. fram _ane
dab te another in the brow
destroy (): The lest ay O_methad When hen the
exinden clased_er when the tab containing the 6
webpage is closeel. sfop \_method eaccathed © just he Bs
sohen “cestiray ch pacthad fis invoked, The dethsny O methad:
remove the cimplef abject fron meno <
JJ
PeimiC): The paintC) methad is used te vedraw th
On the apple dis athe paint) methoc
Plen the erecibian “ab stant) mefhad and whensven
the appleb or hmmuser is veNzed
[The _methad cxecution scpuence when_an apalek_'s excited 's
sinit cy)
“stortey . .
© Paint,(4 )
f- ——
E "he method Sxccution sequence “hen ad pple “3
f | closed is —____— ee
+ Shop ()_— ea,
| + heshroy = _
IDenembe the use. of follening mel
J |L_> Draweval O25 get font()_2) drawReorQ)_9) geManlya
oy Drawoved + Drawing Elhspsee_and ct Jer To dxay) an!
=P Eiipnen on ciscles used draunduals> mebhad can ste
ote voicl _ceusi0 bint top-int eet int width nt height)
sHain a bounding xectangle chose,
edd bo, top-and |0P- pod sca
——;-
Tre eblio i
f
ep en-fePb caxnex is Spe if
Weight ustdht ox speci red bd _height-£ wnidth A
dram: o Orel Rilteq excl pouiby Oe ane
|_ height. Fa: gecvandvel(o 1a,GoRg)s
|
[
ee