Skip to main content
Open navigation menu
Close suggestions
Search
Search
en
Change Language, English
Upload
Sign in
Sign in
0 ratings
0% found this document useful (0 votes)
5 views
26 pages
Java 9
Uploaded by
Sara kounain
AI-enhanced title
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save JAVA 9 For Later
Share
0%
0% found this document useful, Mark this document as useful
0%
0% found this document not useful, Mark this document as not useful
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
5 views
26 pages
Java 9
Uploaded by
Sara kounain
AI-enhanced title
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Go to previous items
Download
Save
Save JAVA 9 For Later
Share
0%
0% found this document useful, Mark this document as useful
0%
0% found this document not useful, Mark this document as not useful
Print
Embed
Report
Go to next items
Download
Save JAVA 9 For Later
Share
More options
Fullscreen
ln ” | K Mier af we | nourible {vent { ieeplion | Vv lial wv|) | po Evcephion put ") Wi tiny | dawa push nwt reeplinn Cuwalon imoy Alintine | veeplion Avilhenal et wplan Hull poirle r eceglion A 10} minal wel wi te | Caw! 9) Anilhetelt) ennphion Nera Vrder oulot( hound Vil fa Jo vw whey a) a tAw % pyull ourlor titlon | nop ounal ( ellen Vl 4 Wy Ahan fo sully Alang 4 "ohe' 4 f Vera lhe yy wld elegans pert nh (4), x I crag hia branllvae ‘wa nwduenion to temdb auntie enors, guch ac Olbvnl caspltin, 0 eraplion dave A found Aenle exeephion, eat eraphian, dynos fay Ta Hyves }, fy 9 caleh 4) Vali 1 Nheow) 6 Nhinwable,OO _ | plan ly bie a Vig coon Nan snips wn Mh Ny Wart Suan Hal i plod te Coan derny puny in! noida mt writ ) rN eligi rayon a wai {4 f ) ' = VW a Wud wilh Wa erated eG VW ornithine (eed " aha ley mn Crily ars } aniar ne 1y 4 Whiev of j Hh of cede be, eemlin C10 i, 4 7 J “ate talib, Wal Ws | l hinds Na ery wnt wy ul be hey hy tel ole Cait illiple catch Micke yiibh cin bo (dial } { une calehy Ck cee ion oily ) t 1 lock of cole dy herd he exrephioons ‘ J 4 tally: i ' Mis block hy ued line Nadiily Ing tide wich as dawg Cannacly n,tlean ole java fivally Nick calnays orate Willan ev cylon te sale Vn Aled, i bailar: f vvvally j WM oev of ade—— a-yinal ' hridione on clacces self) > His a keyword ued fo apply qaubxlone 0 eek, variobles: é a ped fo execute twhelher hy exception is handled m ol. ae" ae ited 6 papoum clean up feat jul bere abgecl is grbog? calleclor . . Tow: tking “Thaw ctequord we can-lmow cilher checked steplion a uncheeked exception — the “Tow ewword is anainly wed —to—tnow customexceplion guntan + single sklement i - how exceplion; 5 Throws» s a “Wis Keyword ts used to declare cm exception. it ives an Infor = mation -lo Thy proprammner hal -Vhew may OCU ON ee eplion sb ‘ik ts baller for the prayrammer Lp provid the exception handling code —* mulliple Lime / dock af code eval te dimlay = aclurn. ype mnelhod name ¢ >4tnrews exeplion clase mame § : ; i] melhad cloode a x f xomple: public ches tally a Slalic void main ¢ Shing (mgs): by ¥ tal data: ofa; hie Se je a“a a calch C Orthmelie ¢ xeeplion ©) § Syslem oul .prinllnce y Syl oul print Cul of the code"), \ \ 0 ' [Link], Milled il ve eplion hy ye w vest dp the core Mulliplercatch Jabaments public class telly \ public Slalie Void mam (shing i lange) f bay inl data 40/0» tol al} new tl tr, Afols hos caleh CAriilhmelie txceplion ¢) Aycervoa spl ters 4 : cate tray tivo Bend repli a) t system bub pnt ), ,) tylemat print int aed of Ihe code” ys i ee leInd % f ilhal: pec “Milhmelic Excipliom [by ro ¢ java tory Pmt fon t xeepl io” gal of the cele . collet jon framewonk yarn yava-util package v wlility oi es qve com crecest all the fealines colielon unit of ohecls features _s jova collection —s a frame work to encure sto’ arc\ maripulati cle i IP ic a-framavoak tal proves em anthiteclur -to slow anf Mani pulate -the qpoup of objects. P => TE can achieve eome operations like searching, soaling, Inse lo Memipalation amd dekdion. x Heranchy of cotton framework : a a z (Merable | : - Ne rfarce © ‘ fi a Rese] ees 5 * sip bert (hie l * T sel | ~ | ‘pj | Themen Yaka |“ ' “(De | | Linked . | Lintedlict me 9 : ts dal : vector | na ee : klack| tee [Teese |‘Inl ov facet clane Vevable Array lish collection’ Linked Lisl veclor ueve ; i ' : { slack — int an P Priority gueue ' deque : Hath set j Sorled | LinkedHashsel : Tneesel . ef. CollecHon faame work : © catleclion framework fsa unified anchileclire for repre : senling and manipulating collections. All Collections framewort Contains -the folowing: = | we « inleapaces : Shi , “These are abstract data f pe thal reprecent coltechions. interfaces allow cotleclion to be maripulated independently of the details of -their representation, In object Bienled Jorquogec, i tnlergaces ennally fom a hleranchy. és . implemdeol “Thise over-the ‘concrete implementation of dhe coleclion Inlerfaces. Im ewence , they one reusable dala sluclures. . Algon than. : Theee ane the melhde thal perform weful computalione , uch a Searching, an soi ing ton abjetls thal jovplernenl colleckon inlerface. The algorithm are Gicl to be poly ren ph Tha isthe Same malhed cam be uced—to many ditteren implementations of the apprnpriate Collection ‘nlerface.1n usenet ave Fewable functionality ; zia Ayal from the java Collections foamewors, Te het BY exonples of collection frameworks ave the C14 Slendend 4 d dibrmy certand smalllalk's collection Kenanchy 4 Nac ' collections frameoorks : have been qpile eomplex »vohich ave a sopulalnsfox having a sleep dearning Curve . tale belie, thal the java collections Fromuak breaks wilh his Lr ay you will Loew Jor youneelf in this. " ® Banepits of java collin tramuvo2k : ; The java collections a provides “te ohn beull AL Reduces programming effort: — mpi ns dola shuelne ond leith hy CE frees iu to conantralc on he imp pont of yo Pag rather thom on the tow- Level “clumbling” required! to matett work, js a 2+ Tmcveases program epee ard Quality: . This ceW provides high paformance, high—quali / Implementation Of we ful dalaslweure algorithm. - 3. Allows Yntewperability arrong umehted Apts: The colon imberpocee ave the vernacular by which pass collection back and Jooth: : * 4. Reduces effort to barn ad to ure mun Ape: ; Ppt nally take collection on inpul-ond i them cx oulpul Inte pasty each cuch Apt had a smal tub: devoled 40 manipulating tt collections. 7 b- Pecluces effort 4o design Tan A: : 7 This is the Np Side of the previous advantaae * envc\ implermenten dln ave reinvent the wheel 2 Mey create omApt that relies on colletions ‘tnsleed tiuse Slandond collect ion tmlerpaces - 6-4 osters cof fusave route * ki ion ‘New data dautwres-thal conform +0 he standard a 1 f interfaces are by malure reurable The Same oct for nev ala ; thal operates on objects tat implement there interfaces. both tmlerhél Ae Lick inbevgace and | { data gloucure, | i f i f i i He Pray List and veeors both dee Cdyramically resigable array -fovilir inlerma much hike using an ordinary erry (yntax: Amayict <1 al = New Tn 3s vetlore1> V= Mud vecloret> 075 Depferencee : Major di¢fevences belroces: cmay ist welor pe Toni ahon: Me such 1 Vator is tychomized pwhich meant only one thread at- A ime com access oe ate arrvaylick Is wok sypnchraniged hich means onulliple ltreads can voork on avay Lick. [Arraytist] actor | “> woaiting Theo le | Threods Thoead2 Treads Thue t a. performance: ‘ Pn lst is facker, sine Tt ig Ponca ed pwhile a operations gve slower pagormemce since thiy are synch | ig Ghnead Sate) If one thread vaoaks ona veclps if has fequined a. leek em ik, which--forces ny other thread aa, ty wok onit do have to wait until the dec kk Dt ee .S 3-Dala growth 4 @nnay List and Vetlor loth grow and shink dic to mainlair optimal use of Storage - bul the waay they vesine Aitgeront + Annaificl tmerements 507% of the current amay sine fhe number of elements exceeds it capacity puhile vecogiy > taemeats 1007, essentially doutling the cuprent OY Size 4. fraversal: ee veclor cam ue koth enumeation and aerator ey travertn over clments of veelor yohile omay Lisk Com only Use Yeraby for troversing. 5 Applications: ‘ Mat of the ‘time programmers popers ovney dict Over Veehy becouse amauylict can be eynctyoni ed explcily using Collechrons Suncbrized dick. ; 6 what is an applet 9 Explain the Lite cycle of apple with a meat tkelch. ; . , — Applet Lite cyck clegined at haw the objet is created, cand Soppecl cme) er toyed luring the entire execution of the appli ~cotion is caicl to applet tite cycle. : > Appl fs a cpeeral ‘in OF prngzam -that is embendedl 9 al “The woabpage tor generate the Aygnamic content «2k rane inclde the braver amd work atclient side advantages: 4. TE voorke at client side so Las ‘vaponce time. : 2. Secured 3. 2b can be exeeuted by browser urming uncer many platfowns including Linux p windows sos “ A avicadvontages | rg is fa-vequindbnent to dient browser fo cxcule r’ appl. : > Applet Life cycle has 5 methods imittr,tlanke,4 “These methods ave invoked! by the browserto exeaute on fhe client side Solecs procesing tiene. X Life cycle of Joapgl et s— “The java applet. Applifclare has 4 methods and + Life cycle provided from [Link]. Componentelass. java -applet. Appletclass: 1. public void fmitC) sis. used to imiliclig ed the apple. Fis invoked omly once. : 2. public void staater: is Invoked dfter the inifc) melfed > brow — ser is maximized «Jt ts used 4o Sloat the apple. 3. public void stopcr: 26 used stop-the applet Jt iis ioked tohen applet is slop or bowser is minimized. e ae public void desboyc: is uted -fo cdg he op al ts invoked only once. inkCdandl dusbloye de | “Apple wots ‘ [Link]. Apmponentclass: : see os oe] paint) The paint rmethod fe called each time an Aur - based applebs culpul muck be nedrawon. This situation Garr acrur for several Yeason’s we ats prototype is public void gaint Caraphics 9 Where g is am objut weperence’ of class Graphic. — 1 aa. é seek ‘ 1ert aes ; 3 creating bello wworld appl inpat jave-apple. Apple ; import java. awt. Graphics; i publi class Helolabald extends Applet § @ovenide public void paint Cénaphic q) 4 9. chauosting C Hello world“, 10,209; i 4 O/p: Hello mat There one 9 clandand ways which you cam aun “a apt. A. xeahion’ applet voithin a java compabible web braceey Sample html 2
) pane | 44, files AC execute Gueryc Ab. yiader 419- Synchaonized] Ag. Vorialdes and melted aq. Dialog 50 clase Al java-uti) 2. hashtatle Chath map) 53. Java-lang 54, [Link] 65. Quene 56 [Link] 5ST Graphic. Java: npplet 56- an applet * Bader taxyout S |4+ applel viewer G0. 4nptlet rather then Appl 61 Excel -B6s-for porno” Gruyoafecl List 63 Cay byl sheam 64 @[Link] ) | t tisk @ 6o Celyjava uti | 66 (Ad) none 61 corobjecl oe Hall of these 6q@) all bf these 0 Cd) allot herea YAN é * AY un af Viewing world - ogy: and communities: churléd ar 4 community of interading objeds ical | har a role to play Each object provides Asewieg Lion thal is used by olber amembers of Nhe am oop fs objec. tach clojee OF peryor™ Om Af Comnnaiily pe wee any cxpprnch of treal ing a aval wodd agen ax AN al -obp ongemines a propram around 1% data that isvobjecls) en asel of wall -depined imlerpaces fo that dala. + fen cop cam be characlerised at chla connling acces oh, ky wilehing the cortealling aby chlo oe xe Paagoretbililiess i 44 a + trimony molivalton 1 Ihe mead fora pre ‘axlpendent bal i, nchilectne - meubzal’ larqvage that could be used lo cute cal -lo be embedded %n vostious comgumer eleclavnic devices, such at mienpwave ovens and remote coms. « objets edith clean vespomsifaities z + Fach class should have a clear vveeporst bility off gow ean t slat -he piapose of aclon in single ycleaa ou hen prahops your clots elmuditre “reece gore ‘thou. x mmewsages and mulods. qnentages Tht all (tho-to we programs thal let uw Krown whale going on, programs thal Xeep Us informed oflen doso toy display shaban ond exrpr messages « thee nsops a be taonclated go hey eam be unereal fy erd uters exnuncl -the von othe sedion Afseunues Asanilatable text mms usally yon done afler you move a menage shin toto arftuowst pundkven aname ane point in a re sip y by quoting t three af tines. This Incruetion) sAclbode 0) villa isa grup of inahclion thal ea Can be called up al an thal eyeant: . Drawing nt srqqie duaws 0 9 bines - lo draw o sigh vam : " 5 pubion 9 Limes | rnalfad lo call bic tne oudline © lo craw btnes 200 eve “he anarded- atk) foun « Me con cliging a Aniaw the Uiernqle Cie (16 Ihe todkod te called ae poatily 0 mehode Ae a hrm al. a nated ~to ath the nam hock lo the Loneoage Ody edhith jowa voot developed m 6 tn Craydhene ts. an ob ‘scl called a clas: ichich eanconla mode. Teevever everything injna ‘6 erdosed vollhin [Link],80-The function wilhin Ware called relhads. dea of 7 objet cveanen. x classes: “claw ps folue painl ovan | + fmm one clase any 0. of inilances can be 4h is om enca pi ‘ation of allstlutes ond nullock. vn of clatt ; . class ‘ pbalcsblly conic lorse F ontlhedetr 4 ' ak Indes stance ic an olged of aclan whieh kan cally aon Quon all aibute vabet and melbode. iMV ie 6 er ole ant a sfiinlar of cuabng pm tnatarncl class Nome aepvenialae axpaiakl New cont a - ce Of ACM. ov claw Nome ree New ronctnlon); ties i objutts ane “ fo call methods. 4 an be osed “b call .o% Gabsle ' « mitted Binding is a7 del ak can be 8-9 uhlic melliid,an. an snnlamnee jhat ts ape) ly ovalale? dhe leading prtion ofa melhod bing expression Via ay, land * itis ie fora clase have tue or more ne lhods woh sf gome name. ; » Joa hat to be alls 4p ee the tovocalton ’ melhod. c its definim akon ching onthe umber andi oxquments.- 1 ue ‘ 7 é td same-narned melfecls aust be distin guia ed ty abe uber of-angumeds ov ly dhe types of te ny “paling ord nbeifonc cae Bn implement i; ala @mlhod oneridng: oThire eae muy be dome oocassons ashen, vor ical an obi supe fo the Some telhod but different behavown dahen-that cad 14 called « « -thak meant, woe shod ovanide the mnlhod cegimed Superclass “This is posi hy defining a ae walk i Thal for the samename, same aiaumerts and fe a dup a a roclhed ‘in he 4 clas a a . ‘then yohen thal tothed is osone in the super class “hic ‘te Known 8 over nl ing . wy Fxct . Excep 60S fn che cocle sequence ° : Exc eptinnsoceut duiing comple sho + “Shamoable “isthe supe clase exception hierarchy fo +norrett synlax. ions in jax ion fs an abonomal cordilion that a! oy mun fime. + Connie time Aerront Cccurt ute + Quntine ears happen tohen « user enters ‘ecorrec Vp + Resgurce ts mot avcilable (ux. file) ° Legic ene Cbug) al noas nok [ire se Exception classes » Ih java exeeptons ave cljeel + sohea a thaw cn exception, you thaw amohject . you cant {bro pst an kart: asan fe Cho ects wahnse classes decend {rom e x ception, however -071 —[hrwakle ae [diel zy : rrowable | Brits) [exeeptiom by be agra eee Hd [Bevel aane SETA alan dy urd ie (ween [tral i rl Faget ll pl { .. . AeXY Sune of oops i th folfowing ane the bast eaps comeep Ihey are at follows: suits: > Claes 3 Data Avdaacion a: pala Encapsu blion 5. nhertance 6 pol poupherm +: papuie Bindi 8. = poss x Fxpnesirns tru: medeip of rariabes,gpectors rnd le 5, an enyession tra Cond mmelad ‘aywations, which are conthruled acanding
c.0-0 CY Touide ce showdala ci mellod ")- $-0-P (Yum. “y mum 5 wd CBee juhlte clase pp § publi ttabie void main Cabing t0098) ' pe obj = mew pec ys oh} thowPatat) j th} emew ec; by. éhowData) ; pe weld , ¥ olaject chass : oe jen he oc ft the super nett cls of CI di biewnchy The oc imthe split present imc Java lan package n Every tle fan the Jp is 4 gpetuulclan of o¢ hy dopaul The o¢ fe wejed when you vaca -tovefr to om oh} er ; deat Sit Maret P ts Ihe beh of all other clauet m ava, Catn yefer to oof type of of} meltal of o¢ melhad Detevipbom getdowe Alans class chwoly _ j hothesdet) the hatheode 10. £07 ohy oe wee ; equaitinet d tampaver the repre 35 reali oh} cloned) cpinpacns “boo © v tape case conaktthring) tnuater copy of invok' - aa to string (9 airmache th waprenlaon of nel ea} gin | wikify roakes apa treed, wathng an tmvokriey oy rwhp) calltedead:
You might also like
JAVA4
PDF
No ratings yet
JAVA4
26 pages
CPP2
PDF
No ratings yet
CPP2
26 pages
Blue Brain Technology Seminar Report
PDF
No ratings yet
Blue Brain Technology Seminar Report
22 pages
CPP4
PDF
No ratings yet
CPP4
26 pages
Deepfake Technology: Cybersecurity Threats
PDF
No ratings yet
Deepfake Technology: Cybersecurity Threats
33 pages
Understanding Capital Financing Types
PDF
No ratings yet
Understanding Capital Financing Types
21 pages
Cryptography Lab Manual: C & Java Programs
PDF
No ratings yet
Cryptography Lab Manual: C & Java Programs
24 pages
JAVA3
PDF
No ratings yet
JAVA3
26 pages
Cns Unit 1
PDF
No ratings yet
Cns Unit 1
46 pages
JAVA2
PDF
No ratings yet
JAVA2
26 pages
JAVA7
PDF
No ratings yet
JAVA7
32 pages
JAVA6
PDF
No ratings yet
JAVA6
26 pages
Cns Record 1
PDF
No ratings yet
Cns Record 1
26 pages
LLHS Grand Test Timetable 2025
PDF
No ratings yet
LLHS Grand Test Timetable 2025
1 page
Understanding Cryptography Basics
PDF
No ratings yet
Understanding Cryptography Basics
2 pages
JAVA10
PDF
No ratings yet
JAVA10
15 pages