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

Java 7

Uploaded by

Geethika
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
34 views

Java 7

Uploaded by

Geethika
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 23
Methods tm jaye } ds, A.java method ica Collection of staterned| together 40 ‘Perfor an operation: | au yy a 2 petho' and ave qrovred vent cements on claws qo Vernables Mometnod (0 Commbucton Ww Tnstan ce, (nittali zation > = vele } a ajc put in method bock ee 3 po 6 Grstatic ble at Nd e want fo eyelule We prece OF code OR an Imus > Hf 0 imide a metod , the methods wit Seog © will Put dectared: traide. ttre four ables that we ee natn q ack UPON the : “aa execute Only if Wde icaluitty we can ead. _5 Methods W! 4 . aie. your?! a number £ so Fs ame (Pat srviele S , set exiodd — Name ee method wmpler entatton ‘ e a body “ at i 4 return type jelse it voit comlaton! 4 hove ¢ 4f t anodifers: |, zndan® mt 2 Y | s Sea by 2Qnd method (mplementator ee } body of tee method f (| . i ok Hmong some — hag HAD 2In rou cored Method vs copable OF q Aandled eeeeptions » Which > NOs aes YM Scanned with CamScanner reran ler : qupr oF qoetnods i — Se Seed Mao ap once et i‘ rate wey ren ; ett plein 4 Nour Lee vor SD ge posites Dealt (atu method) pe clan BOXF : pe oe ge oe “say 0. method Goubie” ReKgnt> outed. Matte double clepth> Sah ashes con cable W/ Hable fyploutle of ie enetneds widths Reight > © Bed noel Saypsteen cutpratiol width heigherdepn) stance ME Static Void matn( Sming Orpt 4 sear Ore . net oe eee output) 14°C £O% t= new Box( 2 ? J : aval dan return BO oboe proyrar dotubye Vou e( f ptt NG Scanned with CamScanner Df enethhods t. pyipe teh meds 7 I eee ete aed abe whi eked redefined *penntin, on Bie bay ed Spm Hho I pete,ljnfaad ”StettYe wAedned WY AP platte deube youumetS oily Meche Keyed ned declaration i prettxed ene called Batre meted " 544 catled ad trutante wiinollt | Bane re obfS an Puc Stetre _ a GUI (ORG SE Scanned with CamScanner “ot Ob Nevo TEAC D3 Spiem cut pretin es 5 sudpat: /20 pone Of tre dratteck Obie oe cuctenn dato rnsmnbers So pint; Hae nance ’ a m5; Paar Naeem vanable VE Raye ten 1 an acne and geting, inide. Mahe me ; ae 25 > Rvantage of te ues conttnations Serer ond getter methods Can Tesi > BY using: Aetier cind-getierimetheds we Can deter Rubia Static void Private members of the clan | 4bieNE 0 = 7 amplement dale fyfding amide Belam joe hore Obs Set Harte +o make data members os pynerte 4 Sgtenareute ger — The geter metheds vot) retrve the data ee Members ) thee methods ave used fo accom they axe abo cated 9h alteKor melody 2 Methven > overtoadt meh s Seller methods are ued 40 update dre vatug! > to define 400 StH OF the ate Members; hey axe wed 40 set manna pelak values “they ave called ox pulleter| declarations are - Generally the Seer and geter methods ave declared bps) BUH: = { " Poly mor phislar j embers becaure only thvough tH the out qm Prer — an cece the. /Privale members af Netnon a : beraune of - mn { uw wreewine. _imgherneli ; ashok ¢ ‘ Overloaded laws Student MAA concveke a ae) | rmetinedh, | cneopdule with lata basin) > | wi ) \Alostradit Scanned with CamScanner 29 Fone of the drabeck betouse ‘ode Valiants PrWiee trang cxcten aatocrnaibord att wu enasiae ofits les Fire Ate nttad | amiable UE Rave Ceriging cone Ao eereming 4) ar nd GeHNG, ertide Mahe may, Sree 2 a ur, A Security . St 2 pavantiage Hof Ae oh SERTY Awe an atten caaine void mon Shurg ass DE gakent vb = New Sxdlente)} (0% we hove nb SetHarks( 16) > ceutapnatiat’ Marks xi! ct Ob gevoren D5 sorte: 18 Ue ined» verloeding* 4oo or More methads) within the she Some Name as Long o% / ncaptsls pote ike ain Tak Abstract 1 Wig. IU NW IGTOY SO% iA .n0 iLPO207n0° Ope * Scanned with CamScanner poh JN A a Senet etove downing Vale Steyr OB Idaka Peypen cnt! a | 1) im. eeeare n pactes “Err “d) speusal enaracket eo oe surg es, 24 AEE SOT ever asuges 0 cofault Se ernie) “SS ee & Be he j or false yds enable tr jove pgamencag. te | ee ana Aue a os of we. 40 gua of ae fotonsing dato ‘fle © nok cons Sart ‘ cite. type co Jue Pregrarerning 2a bye ian Sih enee of sttng Mea -cat ova ans String Beek eas uy ore OF the oltowing nok [primitive data type? ano) Not O Mine. Booka enum a) shart geese ® vrat & 4H Sen anus of character col rin Jest pegammmirg| ASN a4 +44 5 \\uonod uniede null eource tode % Compiled (nto — sere d)'Gource code we used to Compile jaro <) Java, 4) javadoc Scanned with CamScanner +6 are av esi igre, doer nok ede, eter we natn, aula peng bate alue ta aA ae cae 3 Bic Binh) RY foe pate ste typen cones“ urder apoating eh seort ROE Gorisitecsing payne one gollovsing Steg ae DYE Steet dyforg, eddouble ave float and double goat a? 35/6 cebaxn? Yhhe express (60 oo wunnber SV thtinnty of Ane, following uot Bwhat does mitive dala type) ayo») tet avo. Expression B what & the Java prgrammirn if X= Y=? and 2 } Re cay qe epee pos d2on GAS dohat will be the Oviput Fie foising Program QTN > @ubie lam aelbtt i) ava code ? B a {ite Ch ezts) Sistem -¢ wespaitin t/ d\n mod [Hema move 4) fale distma cudea nie fia Madan Britiner Audha ) and % Hw Papen modern execute one me ib alo called Block Staten: ard Se. skatemer statements Scanned with CamScanner Dgiole, TRUE OF FASE every eae ete IF a Fa¥uyT™ apto.p H259.9, 0-594 puetS 00 =) to fatter me euteut of Jove programs Hn IF SR poco none aus, twokenteh a) what OF aut pati ("OK") 7 “ K tom rok B Hoe ankgens|rootpul OLE: STR a) none + iene Ries namie fox names FEBS 5 Stang, ES tf (nore fox a pani OUT geen out Praktn(* Goon"? counting 18 nak are x 1g (raree2 aysiem out Prt see econp PINo. #2 Gh A GoD 4) DING the Keywords, wed sorte to Implement 4) what ane Scanned with CamScanner Sipser scusprnllN( Foe Be coe 9949* ae haven ot pao (Hee) 5 n be : 2 ove, ay Five BY FORM Sriety dvowe Serer need ac emertion" Staite! efor IE HLF Sate a) fon cawemann method without dreating am objet Oh, Merk) 4 y/tomave main prottiods on, channeled coe ‘pe (eorert) S 6 Bon ford B a) none Dcraon orqetane mary gnetiiod core, wed 6007, S at compiler time a) paning orn’ ots Z paning ath wun tine ‘ating nomeet A) wove sn ote deiposstle Lagicail operator Eyre? © frrtromalic Logical anc WOie ne carqumens cou ot voor 19) wheal aah Spencer & a Aric, b jean OPN ri ease ) whith othe Logical operator tm Jawa shot voorks ie DIYs a merge Opand? 4) ne and OF } Bye hci ask arnong Ano (2%) and Slee wit 7 pao (2%) Operators or JAM y sting 4 a) Ay oferaior” BH Short Creuit AND Stor 16 none % agi citlinte AND (HUY "and Shoxt Crete verators ave ‘fast 0 jon? a) Suipping +e ehcond expemlon operand) if P and save 4” ) by BY WMA extra membi onthe machire’ _— a Scanned with CamScanner By ting. yew: cpia> areteaing (poe a) None t) modula operator, fy can Ge agplred + tehten oF nee sy theges b) Hocking’ choint Wurnbers. 0 Both Clears I and Rock | cousce tole? a) tore Poort muumtey cd Joven trot x) can % Wyle tony Gata typ ke automatically type Conk te a) jovele Commane 4 byte dfoat date bape), | s6) Which of the 4 ice ae | & pepaott «BD LAK ' ee | 2D which arrio Foleo: acte4, | 3) Whrcnscnieeiel a) wllening Caring \ enchay ch PpSt's n)rohecr of tne ollrotngy Wamot a valid. jump Statemer| xy char.cy = SNR @) break Bgoto SO Continue dyvetury a) The, \udooo 18 ate 2 bop lean? > a! Valued” declaration of-ia boolean oD Unie eae BH rut oO 5) which me c@) boolean bs = Falses ne following a not avalid, How conhol 3) Which of th erent cl yioh 4) Yeu sd Dynarare | YS tonic OF ana el Gurnky, output enor b) Runtime error word wed foro » 46 Swe ( ty , oO Punami: {no 5 import O extend > rvohateh qne following wa _ vanable d yeittiois 64 Smits p O Mair aD Sy j FRG %O GEG OF BC 9.09 2 SO. Go%O 2.60 oo" oo Scanned with CamScanner rd vi jana (ured -vottiny em fo ctaln elds 9-clai ehetnedh 178) AU PE aayknal ke acteurs ad whic Of The Bott Cisteaeye docurnamvatre 10 D tchich of 208 Roch a ating sce (8 : Pont nuemte Be eats OS: corornand 6 Javadoc. 4st thy type ae iff Coat to a) java comomand yw avalid $0 Aierol 2 of the Following B Ldeqa.a9..6) AsrSsUsuo 4) Ox Heit a valid dectavetisn ok acho} 30) Which ® pordot? st) whic oF tne follow! w on char che" \Ppst e\per"s Shor rN Jump stakemer gchar. che 2 SNIPE 4; \ucooo ‘aniade Valve denoles ere boo lean Hexadedma edline Aeech tine -foilosing is nora java Lectures 7 How & E 2 Dynamic wy Aichitechive ‘Nedtral!"'C) Pome” <) Oe m) wanton “Of he) following option leads tf the Portability and Setunty > As 4) buecede v cxetuled. PY | , d)50 wy the eppler mates the ave tode de feahnes wei “of exception Handling \tunamic binding He Olojech bes 4 of the following. madifiers can be wed dor gm tat It Cary be atcensed bt of a Programm? a qloral Scanned with CamScanner wohere ar Pogerty aa ;») b ove wed to } Wwatkeh ave w me xeon » Back +) represent ntabel” 6) Pe present ee ae * tony and genet ronnie, ESE qnenatige otaty 4) Err coltector m a ) SOK : “aaswe. can ve used Inia fone yr : a4) xonien of dre Follooing ono. (Oe ae Progra identifie™ 1» Sum_ of- data 1 2 Annual salary m 5 By AEC a48 rintin” 9 o” 23,9 6/8 alow Of TANA Programming Cangas 6 sie pptrcerton - BH petop Goi-Apple Pepe sind applications, A¥ alt above 4 . ' what Fate BA) the -jollovsing ore Programming Paradiprns nake 4 \ d d ar SY Proteduval » Object tnperakive , iscuphing »cedlanng MER T kabie 8 evel Languag , Lovo level (anquogy @ cat, Portal e \ omeated ° o 4) preedur ts) por». 00 rovide beter < hw Hauoay due 4 1. Pecgrammning languag a mol te ¥ 6 ( 4 Hou nt { wit d tanquog Lepenntv dpe * sor he a a) vgnich, of the - r A 205 rm Scanned with CamScanner jaa): “end ef Statement 3 “of, &,, taws, get Stored 2-5 ip) where an cbject) 9 is snedarn ay Te De, ah renee Gteap Bb Hace and generics. nick component ie Nepumalble, fo dagierode, eo A Ye ponsibie ito, Optionize e Uled tna: joxm ye reacine cose? ‘G a) savacoes rol sopport 5 “pV rauliple _inberitance, pr dames 2) multiple junbentanc? [7 2 —average , 5 23g, < inberitarnce sy ee ox (nlerfaces “compile sme sears Sag, GUE ie ane ‘orginal ame of 8% programing anki? HEHE TIO ORK 8) Teak "hetio!” ing Canpriage ae Sv ag) what the java Clishitidion type une 405 PACTS: YP Gu) App jae? ee in Sine se Boon te OTN Me 4) Tava Enbelted ®) hat Rappens in “the otxente of Jit compiler, co java? pyle Cae, posuere py Fxecutlabie Code produced stowly, because of, U8 "4 cater ree portability & produted wehout to war relenied? fl WersioA DP ave f Bigge 9/1904 by combini ' U as Polymorphiam atte oh caverriOnia Converting, read i asta onverting veal feature. of Pure Oop e 4) inher be declared 14 ng YJ > youth Component & wed 40 compile b) JDK 9 Oi ONs2 See Prowamm’ a) vin Scanned with CamScanner BDwhich cata ype Value” oh retuned | by all Herteary mori) furnchon, 2 a)int \ b)tdat Sdouble dlorg 5y) tehiZh Of Ane -folloocing ave lagal Unes OF Jove Kate rank w= Cintanrs 2 bye x ecayfe tees 2°99 Cogie) 1015 us bye E Ugle) tole BE AL Stolemerth aie correct "| 55) what 15 the ange Of rovt dela Hype. 9 Java? ®land2 W2ends O Zord 4 a) $30762) 420368, forge ton 32967 a) 190 BA a) -2UUAUEZEYE Yo QiUqUeseut Sava Quire TS Satre Keoor! tn Jave ce Pree 1 b accem Meclifier «Stahic can belq and enétiglizcton. @ Nor ed cl , Method ) nesl what A Static Variable 59, 18h be memory altocated 27 { AY A Stee vanable ¢ " ‘ / orve during the time: of clam loodicg Be) bette oy ‘ clan, Tarther ies dprectly by ag than a | " x A Noume>?t the clos name static methods’ on fava? Scanned with CamScanner conic CaWes the Probe Preble Of faving extra aiiocattoo : OF Java con, @ whet Bo bre Block? to a DA Static Flock “hy © Hore Of Code inwide a yove damm ot ee Meck voll be erecutel NOOSA tem net Wales ‘tne Stahic Block Jolt toe wed tato tne ums Mostly UL Statemersh, pox cntiraiging the Variables prublipte "Peale: Blocks We essen Corree ae MD ar we Hove more than one SertC Hebets i Java? ; Ridge ee can nae our code gt will te exetute tn Ane Same order na en Te dputtors | be state stave”: : ctors anit be Static piano, conte = ae petract method be Stat wn 09 abst AD NO” hare im java Rove State vretinods tn. TET ae wnierqace £1 Avot java & onuoards ‘al i HES scntore, oshatth 4 5 ee rove #4 4 alt Svrer low x _ alam static mitlhods vom ratic Wie tobe pubwe VOlA. Ww ain(ohing ar Scanned with CamScanner state Int a=45 Stahe void miO f 3. Mite. ouk-pantia(this a) + ake: stalte Void main (ching argt) £ ys 5 what % the bitput of pcpram7? can \ take output: corapiler enor- ee Cast sue “nell niger TERVERE, sortie © Ach gucable fee Nan instante Now meted ‘esa Dy didnt 2H > this Prefers to the Current object 4 een eet ads © “ = ie ts afsmys a iO do the objet on Which. oS poryoxe of -fne method oar invoke o a whenever WE < tnnide 4 ok 9, Cone a an be Wed inride the methodk 6! tek ye ane SE DH Keyioord iohenever WE Wed to: x nod Areuld variable filing U esnod Cirmpiat) MD 2: invoke cuwent ; Class cnvoke Curent claw Contruclo, @rabuctor Chaining) oueet ~ oe Ra te paw Van arument. inthe method Cal ayes eA 5: pom an argument tn the tonthucter calt | @ return the. Gurvent clam instante fiom +ne melisd ei ¥ 4 ¢llegal «0 Rave a local vaviables with the Same maine eo ' ed a event 2 st ave namus of Mntance er, vonak and lo ol ise ampiler confuinrs widetieguih, Hie intent 5 ton on vocal Variables 1,/to werolue Ais We lows Bf ky yerolv olUivion Glam "te & do} j tat 2). aucuk R ; ) ) i B (A Obi _ it gues ot 2] Tor cinta) } segs, 4 48) ° Abu Scanned with CamScanner ce wed gb = mew AEH} qa refers fo ob et johen we Rave Nite tia” eee > OE TO tocal variates 5 =e Pale 2 prance verrabtes to avotd WA We ce variable» tate instan ane bor ne write thi Keigend ENE WOM ode tl psrable FF a indront, of wetted compan Daf ve sack OO he object o seus, ad = See a va ease tne comaructor 69 ChENAG ee ae nia onnide Contractor Ut Ant we ave WANG citer ener) apt Gtotement’ ( he methedt Conttricl, > sheneve™ be the (ener wise comm’ hun tre Teta Ayre of ee In woe are CHCA Bb % whenset we ow waing ie , n name Fer cing) nsbuctor Cha gest f od call et ma Crest ob3) f Fruchter cal S-0 pln ("atoil")> fiom the melhiod wie’ mi or = mldnie)» 6%) ™* awe lor tre Same name \ te ein Smeg ogc) f ee) thy pao sate aS omCmt oy Recent mat b= new TAKO? ) . Fandling Yo: mi 3 tance met 2) 40) an aqument mr Constuce! UA lon 8 fc . ° B(A-chj) 7 of No. ereL%o5 eR (Os “8 Sa Bow Scanned with CamScanner Void Aisplay ¢5.¢ Sipten: ou pantin (ob), data’ \ Clam AF tht data=uo Scanned with CamScanner or¥eme * ‘ ar yn cicceie. Sic Ryphicolary eR PoE Lait Fonte T seameverns sara! § = new Shame Cimy Fameh); 26 Scanned with CamScanner | Gets cfegiad and may mot work 40 avotd fuer HDA of srotog, are tot Acad Pofeis Boye Rove 45 Ones “5 ML Operations “Bok we are perforeoming: en -tuer b > ‘Pewop components thould be dere ony i “ide. sveo' depaster: Pe MY default | ak caviabie Chale) — it VRE nN. 0 a " to et sae of Horne Ar MG Belge metnod gra’ wwe Rowe | a Frahartor sk tard Gain eau eat and Fagin acxo\hyared) S ayolipane Com <> ther m ik ake Opaation Yat will Wap Saueipane Lit dhen he WE on frame when Ae c soe gore (Cor public. Noid ‘Fault Claxedperatton (hot operation ) manods’ OW po NOTHIN IDE on Jeritene | wid. set Cota sek Rove Scanned with CamScanner ors > develop Pe Gor programs Using “the felewrog Be ' cob di partes tea, eer i is aa coro “rp. Soptionpant, © Spepeten? ' on tobe pertont xoulpane secrll pane Ft thet PO tr sctis Oot ae sprollable Mew a, compere? od. Set Visible co PAIN aps AOS fare: te Aspley, ecieens Sik YONI hen : : _ coroponent yohost Bgencan CHONG t. oropane™ 3 9 Cage CF rman ae Ynetinod SC Pisrahattor ( ceaker'a Sete olla cent Patan. ise. Corpo F 1! solkpane C component) orat, MESSE had toil! Woppr squoll pane cb) ak the 0 ntaint) ssuou.gont LO Scanned with CamScanner java aust Action aus ’ ange ue Action Ustene eNOS 5 . ro OE fe Uistener is an object that 15 notified wtren am ‘i ae a4 Event occurs os ‘A —pction Ustener (in Java «Sa class at vs responsible 2 gabe Gor Fordirg a¥ ction events such ak when the Wet eteK gE { pddstor a compenet 2 TE 1S Notifed when we click 0M bub ge ¢ ‘ i 3 notfed agendt -Aehon svert nen itera 3 St is Fase at event package Ze for only one methed acton performed The achon Performed() method ts tnvoked austornerticaly when 7 4 erer We click Om registred Component Public abshatt Void ackon ferforned Cagimeient © ommon Approa ment the #ctionlisteney ppicattor need t ; ; D imoement Acton tistener, enterface in He cam a _ m Action! he implements Actsliset - Scanned with CamScanner empork ave aot prs pork jo oppetes? i, cious a-tcp extends eval x 5 xa Fit) a mowierdepin) jenn ne L padre LT puldic ¥ 2a mou prone (Mowweevent ns) pun camo Kened) Scanned with CamScanner

You might also like