You are on page 1of 60
tL borguage Funclomertol Furctamerdtal DURGA OFTWARE SOLUTIONS SCIP MATERIAL A, Tdechifiens A. Reserved wovels 3. Des Types 4. Likeals Ss. Arey 6 Types of vations FA Veoh o8ty mnettiod & maint) method * Cormond Line. asgqumenti ee coding Stamdorcts. > Aname in ‘Tove program (& Cael Totmcbc fic. > Tecan be a clay rome cA melbod name cA votialle nome ot ® ea: des Tat” 4 puldic stotte void main (StaingoI ) int =O; e} @ ® 3 + Rea for Elects, Js. The onty allowed! chawactizs in Tawa Pdentibiers aXe 27x), Alez, 0% 4, —Curclerscore) avd & (dollar). Th we one tmging to wie amg otkie, ehavactit tay we voit get Compile time evict a betel number botalae ¢ Ors PLOT NO-S6 HARSHA CHAMBERS, SAI NAGAR.NEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905706 DURGA SOFTWARE SOLUTIONS SCIP MATERIAL R. Tdevtifies chewd wk theart with oligits. | EA: betaling — | ogtotal X 3. Tava tdectihiex are Cow Senittive - Ofeourte Tova Jowquoge ieel& To cemsicleresl a4 Cate censibie programming Nomnaprneya.. ex: Cle Tea L ink numbet =t0; : we can differentiate int NUMBER =28; ° Wa-E Case TAO Member = 30; 5 4. There fe no Qengtiy Limit fot Tava fetoabifiens , bet fe fe | never mecomrmencted te take lewgiy iduatipiers becox it a ee ee % We cant ute eserved wows ay tdentifiers iat ant Xint 3 cto; —9 ce Reseavel Wore + ee ——“N™irCC—C—i‘CENCiCNrts_C—CCSCW Ad felestibiers ee thaw ‘Test 4 Ps v me) fet Stringato, | fot Runnalte «20; ' S.0 p(Strirg), | S.o-p (Rurmatte); ea PLOT NO.S6, HARSHA CHAMBERS, SAI NAGAR.NEAR BIG C MOBILES, MADHAPUR-S00034, MOBILE:9505905786 4 DURGA SOFTWARE SOLUTIONS SCJP MATERIAL, | { > Eeeatrough fe ite degal he te Preckfinel va clas names 4 | Tderfoce names nu flesbifiers, Ik to wok a qo programming i practice. Qi which o% thi following ate valid Tana iclechibiens | — _ . GC cath “@ $44 G@® total number XO Mt | R® lehoncts CB tat | O Trgreh 5 ie —@® Tnhger | YD Rerervesl wexolu 2— En Tova come words ore ryenved te repent some meaning ob Functionality such bype of wowels ote Calleal Reseredl wowelt Reserved Neowels (53) Kee wets Ceo) Reserved Literals (3) MN, tr By nul aR gee Gent PLOT NO.S6, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 3 DURGA SOFTWARE SOLUTIONS SOP MATERIAL ted euros (a2) £ L U Tr. L uy Kepooels — Kepaiesets ey sorely beqvorcly cles objet void got got gt dot related — -vetatad vse | teclyps Houcorel madibins — evaptiin Uomling eaptnaly promely ethan byt 4 pablie clans _ cae oprival Peterface super “G Tab Swited protecteot Packege — thig i cone et impotl — tnitom ok hifantt « trtencly ou vobile. ee : ® i abehock Jnpleronty bevtean fot ane ced © ane tyrcbrronis ® read atabile Continue jen “BT ststHpoww > Uh methad wert oeliinn method with void <= elite Em Tava retin type tc wemdatorg , but ine tang obi ~ i toga reli type fopttond and clefontt reLiery type fe fat Lrwseel lerigeoorets ¢ . A get = fs Usesp. of gia crectisd several poolem: fh otel hewauoges. J? Hense SON) poeple Lamned thie keyword jiteng Wen ne should cteolaye that 2. fy Teva > Ue final Frutead Of Conet. Notei— By mittake if ne are brging ese gats and cenil Ike we wit gek compile time erred. PLOT NO.56, HARSHA CHAMBERS, SAI NAG 4 [AR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 k DURGA SOFTWARE SOLUTIONS ‘SCIP MATERIAL | Reserved Litetals >— fees SE} vette for besten dete ate | mull <3 ctefawtt value fo object” reference. enum (-5¥) 2 Up ne Wont te vepreedt a group of Tamed contents Win Shout ge fo enum. Gt enum — Monity eoumn Beer SAN, FEG,---., DEC; kr, Fo, Rc, FO; a 4A. AY reserved Worcs Ty Theva contain onty bower cose otphabet” L] Sqrnbels. R The new keywords Th Tava ate Strichtp —2 bv aise —> lav enum ——9 (sv) 3B Em Tava, ne have onty new kegwerd , but nek delet keguoewel becox dethuelion of eters object fo the vusponsibitily Ce Gortaoe Collected. 4: stvichtp bub net Strick Fp inttomcee Lat not Inctamee OF fgnchronizes| bub not Synctronize eaten but net extend Tmplementi but nat- implement import bub nel impede Leen RECT PLOT NO.S6, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 Cont bab net comtbont: DURGA SOFTWARE SOLUTIONS SCIP MATERIAL @: When ce ‘the folleroivg Lick Contains omy Fave eu eavedl Worle? SO evo, delete X@ gato, contont- KAO break, cortinus, whine, exit KO© Fined, Pinably, tirnbixe KO© throw, theews, tovown X® retaby, nett at K@ implements, extends, Fmpoots K® sizeot, Inttomeaote K@ _inakoneeof, Stictep A® byte, cho, cat None Op the above i Aoltesing are Valid Tava Les aved worele? © public GS _stobic GB vid X@® main © st XO nq! 3) Doty, Type -— 14 Fave. every variate has a type, $ every eaprenion has a tate $ every type 18 Strongly checked, > Exch § every midignmendt should be checked by the compile fot ype compatibility, JP Hence Teva Language fs consiclered as — Shrongly typed programming PLOT NO.S6, HARSHA CHAMBERS, SAl NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 FTWARE SOLUTIONS gee _ DURGA SOI SCIP MATERIAL J? Sawa ie mot considered os Pare objec ctiented preparing Lamausge becon severol COP features (Like Mullipte Inheritance, Oper eter ovetleacting TE) are vol~ cuppotted by Tova. Melcoves we are Atponctivg CN primitive dete beypes which ote | nen object Primitive Data Types 8) Nameic lata typ Non—num eric deta types a date ed, —> Enrcegt boalean oud chat He Lemak ning Ate bypy ate Censidered a4 Signed tata bypes becom we Com sepresent beth in He § ve mumberz, Tntegrvol dete types 2 — 2) bytes Sixe t 4 byte Cs bits) MAX VALUE FHI { MIN VALUE $ 12 \ Range ting te H2t i Eett 2-4) Sigo bit o> +e o> —ve, CAB HE FEF4G HEHE IDF eee eee Sign Lit. > 0 means ve number & 4 means —ve number. PLOT NOS HARSHA CHAMBERS, Sl NAGARNEAR BIG MOBILES ADHAFURS0003", MOBILE 9S0S90S700 + DURGA SOFTWARE SOLUTIONS SCUP MATERIAL > He renbers will be repreyented ive: iy the mem A He member Sill be reprsented tn | en: byte b= 16; ais_complement for. bye b= a; 7s X byte & = woes, X bye b= tes; KX byte b= bane 5 “ ys byte ba Sduage > byte ctete bype fe bak cuttely a ne want rte heme let fo terms of Streamy ether rom the file ch from thi nebwesk, &) Shab 2 — The mest: —roely vlad Acta type io Tava ie check dlste bgpe Size + 2 byty Cre bite] | Remge § sages te S2t6r at 221) (EAD U-Shott f= 2246ty Kehat < = aaqees PLOT NO.56, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE-9505905786 € DURGA SOFTWARE SOLUTIONS Kehoe betes SCUP MATERIAL Rohe S=tre; Founcl : bevlean Tewived + Shell > shot date, type fs bait suitable fot Meo bit”_preceiomt Like 3086, bd thu process ave Complitiy out Atid mel hence We cerreaponchirg shedt alate type Ts ote oak ate) ola Hype 43) tetot— 5 Te mest commonly vest alata byte ty Tove’ fe Int clash type Size 2 4 byts [22—Vike] Ranges 2! fb 2%, Erigreescae to ete 836 a7] eit ear Pnk A= 214F 4826475 _ Kir ae nssqeseas, —>@i kept runt ton HP) Ki a ecrasesscgeds Kirt ae tos; Kink ae bees CE 2 incompatible bypes found : boolian PLOT NO.S6, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 q DURGA SOFTWARE SOLUTIONS SCIP MATERIAL 4) > Sometines int may nek enagle ‘to held big values thay ne Sheutel go fot long tet ype E20To hetd amount oh distance Krevellecl bg Light tn ew days lack aug met enough than ne Bhowtel ge fet org ate ype. long t= 126,00 X60» * :| AQ: To held no chavactine ee fat moy nok enough Thy we should go fot borg alta tape long Le cf. tematic); Size + 8 byte [éerbits] Romp t =e ty 24 Note: 44 Ha above aot types (byte, chotk, Mt, Leng) meant for L - wepregeting integral volues. 2 we tow he repreyent” flocking potut— values tin ne Shout ge fot Meshing potk adeta types, Elecivg point clas type ee Plea _ eee 4 [ath we Wonk Ste 6 deci plas of aecuraty th, ne Shoulel| places we ten o yp fh double le. Heat follows eingle precision. |e. cloutls fotlewe ceuble precision s Siew: a bya 2 See te Wy a Renge 2 -\teseg te 1-Fe308 PLOT NO.56, HARSHA CHAMBERS, SAI NAGAR.NEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 X rq XUsvD I 1 DURGA SOFTWARE SOLUTIONS SCIP MATERIAL | boolean doth ype Sine : Not Applicable. C VM clepencont) i Comp t Net Applicable ( But altered) values cbt bre Ale} CarTooleam b= bres ee | XK beoltan b= os Yh bevleen b= Frans Chat dita type? POA longuones Like C,Crt ave Ascet code bosed amd thE no. Of ACET chores are les Haw ob equel be 256, to represent they. Choraclins shite ave enough. ifm the size Of chan fe A bye. 5 Bd Tawa fs Unt tole based ond the no Of UNE corte Chatadlias ae > 256 & € 6536, "PLOT NO.S6, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 " DURGA SOFTWARE SOLUTIONS SCIP MATERIAL — To represent tLe ech choroclix © Like rat enough tran we theuld go fot bits. | p> Hew thi sine of chat fo leva fs 2 bf. Sixe 1 2 bytes C16 bits) Romp t 0 te sesas. Summary cf Tove Poimthie Date Types ¢— : Comespon) yb ult Value tn type | Size Reap Wrapper clos) ; a abyic | ng te UF Cotte 24) Ble 7 shot 2 bya |-serse te saree Ce! 2'Zy] Short 2 ite 4 byl |—21ataesces t tiarsescay| Tela : Cate 237 i a re aa : Hoot thyat| -s.qese ts 2aes¢ Float or0 Aruba | & byl | —4es0e te .¢ez0¢ Double o-0 bootie | va NA (alowed volo Ere] Bookan chor | 2 byte 0b essae Charactin Netci-The default value fot object atfevence fe mutt, 4) Litem > — ; J Any content valae which can be ati catlesl Literal. a ptotgpe] theme qf variable] Comtbont vole | Keecguochd i dewts! OL Lite. ~ Ate a vata & PLOT NO.S6, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 iD DURGA SOFTWARE SOLUTIONS SCIP MATERIAL Lodegral Literals -— | |? Foi Eatead abate types Gry, thet, tat, tong) we can speethy [Ub erat value in the following warps. 4) Decimal Literals (base 19) = — | > Alleries} otigite are 0 “be 9. ext tht aa, — Likert vale Sheutld be prefixed vite “0 amd atlewed digits we 4 ote +. JEXE Ink a = 010; 2) Heractectmal Literate (bows i [> Allowed aligits ave ots 4, a te Ft. 2D Fer. eatra digits We can use bot lower core omel upper Cove ~ Att A At) DP Ths Home of verg few teas where Tava ic net care sensitive. > Lite vale cheuld be prefiaed wtih or A OX, et int a= oxX10; Jo The ane Ht only potsTbe wae te specity Likut value, Qi Which of the following are valid declarations 7 os Th ae to; K@ int re oF06;— OO ht rxoss9; @ tot re oxFaces —O tt rcoxBeot: Xe Pat A= onBeers > ce "PLOT NO.56, HARSHA CHAMBERS, SAI NAGARNEAK BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905766, 3 DURGA SOFTWARE SOLUTIONS SCIP MATERIAL Eo cay Tet Ps ov my Co) = OP, Fink a=t0; poxstrixels optag ine poos0; Fak x — OXAOS CO, = CPe Lop Caee sat ‘2s = ox Hixisle ote a6 y Bio Ft 4 > By default every frteqral Literal of Tat type, bet we con spectty enplicitty os lemng pe by sefpred wim Lat L. CUE ato; L 10; int a 2t0L3 —> PP Thre te ne dinect way to cpecthy byte amd chott diteral ewol oy the value 15 within tthe vege Of bts “They compiler, arctonnabicatg treat te as byte value, ied Chott Liters also. St byte b 10; byte bens, TOT NOE HARSHA CHAMOIS, SH NAGARNEAR BICC HOBTES HADTAFUR S000 NOBIESSTSOOSTEE 4 Whenever Weare mnatgntng fategral Uteeal te the byte vastable | DURGA SOFTWARE SOLUTIONS SCIP MATERIAL “Brot se sageqs Shek 6. 52 g60; | Flocting potst dikerote -— a 2 Like, | by otefantt © Slecbig- peta r ae we Can spuily enpliedty as float type cl teffined Olle EAE’. fe op howe tepe, | ee Heat f 2 ir2. 565 ——> (cer Pp —aAmble d= 122. 456; Fleet fa irs, ast: — We can speekty enpliciity Hating port lberal a4 cloutle YG 67 euttined wots a! aa “p’ efeounta. “This conmention fe not reunited. Er: Ceuta 122-456 D0: Fit f= az4s6D; cee PLP found : loube requtvest flab 7 Me can spectty Hacky petat Ubeals oily in clectnel tom ed we cane Speettzin octal £ beractecimnal forms, | EMC owe A a 12s gse; ee 1 doula A = 0122.456 5 BAS treatil a9 decimal ent bat net cebay | clos de oxinz.a 6, a ONG cet PLOT NO.S6, HARSHA CHAMBEI | NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE.9505905706 1s DURGA SOFTWARE SOLUTIONS SCIP MATERIAL > We can otdtgn tnd Aikrel citedtly t te flocting pote clita types owl that Ptiganl Lital can be tpeecfied ecu in octet o& henocleeival ob dacimut form, a: Aout de 122.4555 Aol d= ores ; 9 (CE —deues A Hox hace; —deulle daox Keofs doubts de ort, CE Aeutte d= to > Bat re can't auaign Hoativa pete Literals to the Prtegral tegpet. en int ates 5—> (C@-? PLE 7 bh cam cpecthy Heating pete Liberals even. Fy enporeritiok cforms wlio (sctentific netzhion). en: Mout t= tres; tees ee = = 2X Lod Sepsis) = 1200 Het fetres ji Pleat fa toerf: PLOT NO.S6, HARSHA CHAMBERS, I NAGAR.NEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 16 DURGA SOFTWARE SOLUTIONS ‘SCIP MATERIAL boolean Liketal -— | >The only allowed valour for Lovtean lata type ane. true ot folie. | ent Aockan ba bre ae j Ee: incompatible types cfounel stab requivest ¢ boolean } X bokan & es Ges cannal final tgbel Syembot «Veni able Tost, location: class Test Xbooken be Te; K boolean bate’; ee: uk aco; yO t S.opl ype , “ fee: incompabele. bypet aa cfounol ¢ fal Sop CHiN)! regucheal ¢ besinn chad Litetel 6 J Ne can repent « chat Lkeral as a Single Strate quo. jen chet lean chatetin within Kent choa; PLOT NO.S6, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 VF DURGA SOFTWARE SOLUTIONS Kear che tals et thcompatille ype foc: jo R. String vrequited 1 oh SCIP MATERIAL Kerr che ieee unclered chotactey Literal Btonit- a Statement We can mpruent a char Littal 4 Tategrot Litual hich rrpruents unit code value of that chotacler. 2 The ideal Bikual can be olpra Chak the oft; char ch = oxFace5 7 Char ob = OX Reef 5 Chit_ch = 656-353 Xchar ch = 655365. We can rpresent” 0 chat tikuel fo which Te nothing bok ["\uxxxx'| 5] AGH here deci envhon ch = "\usces's 4 digit a checimal number. OnE cede represerctaction Sop Coh)s => op ta Xehar ch =\ucoes ; Kebor ch e'\itece!; Ch hm \Ubeef'; PLOT NO.S6, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-S00034, MOBILE:9505905786 1g DURGA SOFTWARE SOLUTIONS SCIP MATERIAL > Every cseape chatelO in Java te valid cha Liberal. uth che Nols | ha he vey X cha ch ~ Uo; GE retipt eeope chatac) [2 New dine 72 Horizontal tab [> Camione lion \e +s Bak «pace \¢—2 fern ders 2 Single quali: \—b cto te quelle \\——$F © beck clay String Liteed I PA cequimte of chovacktcs wetthin ould quali Te cobb hing Litarol. ear Staing 6 -“avaly * aK ersion ebencements polite respect to hitetale :— A) Binary Libanlas Until 4.6 wrcten we con spectty —fitetal vole fo the Tateqral dt, type th the followi zo A. dectmed coeds xu PLOT NO.56, HARSHA CHAMBERS, SAI NAGAR.NEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905766 9 DURGA SOFTWARE SOLUTIONS SCIP MATERIAL > Buk from Ut vertion enwarels we can speethy Liktol valne even th bin alee. > The Bikeral vale cheuld Le prepired wilt ob & 08. > Mowe aagits are Oo ond. |eat Mt ae okuny — Soplad; => opis” 2) Sige oC) ereeescore Sppbel fy Shemace Leal Is From wa version enwerds we on Ue () symiel i Niketals, num edie ear doutl da 22456. F595 23466. 4_@_95 Aeute de (23466. 49815 outa A “the Code > At tke tine of compilation thie underscote symbols oth be Bemoved — arittomatic [> Here abteL compilation te above linus voll become. doubly dea inzase.req; Ls We can waite omy number ef umdersede symbdi Mas the digits (E22 dows de) a Segmbol omy uo the digits. 2 B-- 4 56+ HB 4 ve con wre urclervecede Ent Hout de 125456. 4_ ae dole ie os aS eA ee ee PLOT NO.56, HARSHA CHAMB! SAI NAGAR.NEAR BIG C MOBILES, MADHAPUR-500034, MOBII 20 DURGA SOFTWARE SOLUTIONS tye ———— cha, a tog fe Shyla we com arsign its value “to a by le Host ver£oll becow Prbeanelty Wig follow Libporent: memong Tyrpentctions, e: thd Feels So plfy=) elp c100 5) Avrags 2 Frdrcduciion SCJP MATERIAL Tne 5 bong — Float —> chante > Eventhough z er) Deel alion 3. fray Creation 4. Array Guitinizabion ©. Array Declaration, crestion b Enctintinatton 9 sees 6 ote vs ee 4. Aroniymows Arrows on Array element Att gnmonle | FT. Ayvey wortelde Acsignmonts. 4) Batvoduetion i— > tn Amey it an indered collection of fixed n0. o homegeneous ete dementia, >The matin aclvartaep of srveys fs we can represent rmbt vedas Fil a single vantabde - fo thal” Aeadatithy eh the Conte, PLOT NO.56, HARSHA CHAMBERS, SAI NAGAR.NEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905766, 2 DURGA SOFTWARE SOLUTIONS ScuP MATERIAL t > Buk Her main ditadvartoge. of Arve He fined in sine fen, out. We cre tid aw Ayr wit seme size thee fe no chance ] ieventing A clecreati the Size baredon ow wreguisenent. > tere te ue arr. concept compulsory ne Shed Rnew the size by oclvance vohioh. ow net peuible vtunys, > We Cam overceme this problow oy dacs P sing Cais 2) med Declaration — ee eel ed ose ee tek OD A359 recommended to vite beeox name o% ie Cheney ine cans Sgoreted from type. tak a wee > At the Lime. ; Aa declerction ne can't pectty the sine otkixraise we sill ge Compile. time. erro. eu tle] az —se ce IACI ag Ge rey eee ae intc3cy 43 int cacga5 | ik AICI; Wt Cdl — fet Geel Atel Tot c3aca; ee ene MWEEICICI my ine cacscaa; eo ts “CICICI; | PLOT NO.S6, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 22 DURGA SOFTWARE SOLUTIONS SCIP MATERIAL WIC ICI CIa; MECICT acy ECT cIca; a iEoI acicq; MECT crey Tat CICIACI; tate Clacicy . Bi whi of -the ctottewing -Aavay tectanstibny te valial? MEET ak; — OREET acab, ar _* ee eel Meo la by APD cj PS) ee —iWeEI 4c3, L033 a2t boo itty CI4bog; ase be DX teeta c4a, cab; — co PB we < Wonk te speetty TK dimencion befoke “Ta variable this acct t applice only fot the first Vatialle in leolatatin, A we ave ying he opey fot the neat vartakls we worn gel < a K KX eu int eod Cle,cIb,Cics 9) Array Crextion p> every Arey fo Teva Te an obgjecks tenes we can _ by wing new opttetoh. €a: tht asneo M1) CL | TLOTNO.SG, HARSHA CHAMBERS, SAI NAGARNEAR DIG MOBILES, MADHAPUR-S00034, MOBILE-9S05905706 RB DURGA SOFTWARE SOLUTIONS SCJP MATERIAL Fok every dormy type the cerrespercling clang are availalle $ [cemapneting claw noe ea iM CICI fcr byte ce Short J cs demas cs Hoot Ce doublet 1 co beoltan £1 cz Choad Cc cho CICF = Pe tee Lime of Anrreg ere ation compulsorg we Sheutel peotby te Sine, 0.0, we wil gob ce. St ECT aenes mH IS X MWC] aanew ftCsi7 RPL is begol be have. an Array wit zero Sine fn Teva. aa: TtCI Aenea ttle; xe 3B Zp we ane. trying tw apeetty Army size witty seme ve fat vole we oi gt Rend Crreption Kaging , |Size Caption. mane MES]; —> 24 DURGA SOFTWARE SOLUTIONS. SCIP MATERIAL 4 Te Speetty tray Size He Atened dae typ ate byl = i ch - tar _ | By mictake Tp we ore beging te provide. a ott tegpe Ki ne wilh ge ce, ]& Ft 9 aaneo PrtCte]; ey tLe]; be TILT anne MtCbls Shak = 205 Pitty aenew ttle]: KEI ae new tHE Liet} Vegwived = tae Noles The man, allowed imey size ih Jara fe alataescad, which fe man. velar of Tab clita type. en: rey mene tnt Cra 7eescayy; Xtra aenes ttforarae 6 aR] > Ee: frtige, number too lage 72 Fo tee Hast care, we may get Cet OF Memory E-rreh. a Mp picienl- heap memang fob anette - Thee is He Pohl, With machit but net wil, Tava, a ae Ce ee bn Tava, muti. démensional arrays are nok implemenctaal fn mactrie stow ame Hite are implemented by waing foray of Arrange apron. : The main advantage op tly appheach 1e memeny tibizetibn will be impreveet. "PLOT NO.56, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 2S DURGA SOFTWARE SOLUTIONS SCIP MATERIAL Gisbtebe) Hie] Esl €ex:O fC jC] «=new MIL; a7 aCTenes itCay; AC] = new EC]; q ISAO? iteI0 507 acne heOICICI; Aleleneo MHESIE ACIete neo tata} AOICD = new mete ABI bI=nes mecigs Q ACI ene Te CIE2y Gi whch of tte Flloutog awe valid? XO tter acne et OI; @ intl? aenes hes]; @ MOI ames MECICI @® mecara acnes hecstca; X@ MCICT genes ite tea; ce CIE a=new Mestcqay oe eJcarcg a -S mecsegr3 4. @ X® anes TMttst pe] CsI Seo MICA CT: MECICICD 2 anew WeESICI PST; CICICI . A =new iC ILed osJ; x PLOT NO.S6, HARSHA CHAMI ‘SAI NAGARNEAR BIG C MOBILES, MADHAPUR-S00034, MOBILE 9506005760 26 DURGA SOFTWARE SOLUTIONS SCIP MATERIAL res abion £— | One we cvectid an array Tes cbngenta are by olefaull inititeced wit Aefanlt volumes, WEI anne ft C3Iy Sopcay; =y0lp: [Ise@2sas: “ “, Suowplatastying es) defonthveg Scop (ace), 2) op: o (eran @ henadecinal havtcone > [Eble Whenever we ane tnying te paint any objeck seferenue fetewnadty hb ing method will be called en MECTCZ aenew Mt CsI fed5 Sepla); pele: C6e se25ae Scop (aced)) <9 ofp: CX 19e2t iF Sep (acoltel); 25 olps0 e2@: cIcd ~asnew PeCSICIS So-pla; op: ClTrse25as Sop (ate3); => olp rrult Sop (aceitel); Ere) tei- Ef we ane trying te perherm oon opuiation on null Thin we eee tag See eee ae oe on ed -—— | fettidined wits clefpantt values, EF we ane not stistieet wits olefranUl values ther Wwe Can override Tye clefantt velues wifi ont customixecl values, eat EET AH mew ine CTD ALJ = 10, PLOT NO.S6, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 24 _| DURGA SOFTWARE SOLUTIONS SCIP MATERIAL ali] =20; e aI = 203 o AFF ACs] +403 oe EN ACAI = 50; x5] = 60; —> RE: Array TnclexOutOf Bouncle Caceptron *ESI=40;—> Re: ATOOKE AG-sI= 60} 2 aE ne ore. trging to acces anrng cbemrent with ent Of range finden thin We will BE ES saying, Array den Out Of Eanes Campion ) ciremy Deetmrstion, Gre. ation 4 Eanitic ination fegle Lire 2 = we con declare , creck § Tritiatine on cant ina single Lire, ine Ft as renew tls): ACel=t0; aCiy=20; Ated=30) alto. eu it dca ave f {to,26 £0, : { dro,r0}, {20, <0, 04}; a oes ext t MHCICICA a= J Lfuroroyten,sey} { L6o,20,20}, f10,100,110}} }; Sop (903013 101)) => S-op(aci 27607); ay elP: 40 S.op(a oC] (23); =f + AE DORE) PLOT NO.S6 HARSHA CHAMUERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 SCIP MATERIAL DURGA SOFTWARE SOLUTIONS Sop (acid Cotte); <9 «lp sce Sop (ACiIL1T Cod); = OP no Sop (a Lode (sI) = lp + 20 S.o-p (afeIlorcrdy ae cebelse) ») Cel > Fh we Wank to we “thy chest caf Compeltory ne Feber fn a ing Mine only Ph me are baying te Aivide eta mmattipl Lines we of get Se. have te eat fot CJ aa {te 20 c0o}s | 23 > feng ts a final vetinble applica only fot corres > bengthy vartolde mepryent: size Sf the anny - { Gar AEC] w= Le, 2, 20, aohy | Sop Cabral); Sop Cos beng )5 od alps + 2 ae | tegusey ts + final enethed appli det Stafng objet, {, 2h retin we. of chawmelirs prsent ty Srey Fame ~ firet egal Ex String aa teureal5 S.0p Cs. hengtr J) ‘et variable Meoghtes Cs. c)pepeths 6 \ beatin: clay _fAStri FLOT NOgo HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 a - DURGA SOFTWARE SOLUTIONS SCUP MATERIAL | Mote: — Lengtts Variable appicalie fob args, but net fot Strtnq aejeete reteve fegines method applica. oft Sting objeutt, ak vat fot amvags Si Stayed eof tan saat, aaatls Bie pls. tengths) j D> ows s K Soop (8: tang 0); ——— X Sop Cscot- Aanath J, Ee. e C8003. gods eta Ger erwmat tool probe Sgmkel mettced Leal) Ancien: chats Shainge3 EE + camnsl Final Spmbol Sql t ortalle engl lecabien: clan Cae |retc:— dn mublt—demonetonal erags, Senate variable cepresonti ont base size, but nok 4otal sine. eX TCI] Aanew MtcoIcsl * to S.c-p (adength); = IP 16 ov ao Sop (2003. lewgtts); ad olf: 3 ? There fo no dikect wary te find total Sengfis of sionl amrege, tub we tam Find nelitectly at dollews, 200. beats ot AOI Henge tated ng + =~} F) -nengnens Aavage 3 > Sometimes ne can deelate an array Cy namely amays are Ctleed Are Ath ctimen — withenk rame such bye > The matin noe i Ay anonymous arrays fe just fet instant we(t [7 he can events, anengmeus arrays a4 folleds paw tntE Tdi, 28 20, 40} Sain ATTEN oH NAGHTNEAR TOC HOBIEES NADHAPUR S000%% NOBILESO5905786 30 DURGA SOFTWARE SOLUTIONS ‘SCJP MATERIAL, TP We ton Create muti dimension) anonymous arrags alte > While, rece es eee oe cant speethy te size otkeorce | ne will get ce. Ext new Mrtls] {lo, 29, 26) X | new Marl I fie, 26, to¥ UT 2 Based on cur Teyutrement ne en give the name fet anenymevs amay thay Te fe ne lenges anonymous, Gt ttc aanew MCI ft, 2, epoe7 Se clay “Tut L Ps ov mt) L Sum (new tl {10,20, 20,403); 7 5 Se eee eine Pc v éum(Cintty a) L | int botat=o; dot (ink ays a) botal = total+as 5 y SOC The sun : V+total); J | Bn the above enample, uit te colt sum (—) method we wequincel a anven peat tte computing tak sum(_) method GU we are rok Herts anengeneus array fe the best choice forth ryutremert: PLOT NO.S6, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 3) DURGA SOFTWARE SOLUTIONS SCIP MATERIAL 8) Arvrey clement Aesignemertta <— CouD? For pacmibie type errays as arrag cbmenty we con providle, omg type which can be Impticitly promoted ty declared type. E1Q: Fot fat type anvays, the atleweel elmont types ave byte, Shot, chor and tue, EXO: FA Poet Bype WY, the sha : Spring > He nab howe chan, éat ECT aa new fat Cody ACoI=0) Aabrdelal; byte b= 10; “ated =by Shest s=20) AEs = 5; K xa = tos) CoD: FA Objet bype army at anvay clemnents wa can provicle cilia Aeckared tegpe objects of ike chit clas object, CE: PLP found : doukte srequivedt : fiat SAO! Objetcy anew Objet LoL; Alo] anew Objettr; ALI} = new ShAing Uttasant )y 4023 = new Dateger (10); EAP eumber C1 enero Number Cel; FL = news Antagea Cte); ‘PLOT NO.56, HARSHA CHAMBERS, SAI NAGARNNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 ar DURGA SOFTWARE SOLUTIONS ___SCJP MATERIAL CHET new Dowtle (10.5); EE tineempatilta typed “ ; foumol: Sh Staley YJ = new aod Cabuagat); Fejuired 2 jek. Number \ GeO? Feat tterpece type amas os sovag clmente ae con provicle- | Thc tmplennerctistion clars objects. | Ea: Runnable A anew Runnable Cie]: Eft enews Thread; KAO =new ving Crotasga') EE+ incompatible types founds jl. Ching gpbredd s jet Reennable. A. Patmitinn type arvege | fing tyre whch can. be = pet preted Tw lectered bate : 4 8. Object lype. aremps Papen type ot fee chill cla objecti fd abthest clan type arrays Y. Interpace type arrays the Tmpomentation dae ogee Fa. Steve [ay aw Ventas. detgnmendy t— Case(It Element Level promotions are nek applic-Ms at erag level For Cranphe , Char elect on be promote! “le Int -type , but chet cant be promated be fet. int CI a= f10,20,30, a°}3 etekea cha Lle' “te, 4's PLOT NO SO, HARSHA CHANBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 33 DURGA SOFTWARE SOLUTIONS ‘SCJP MATERIAL } Qi which y the “fellewing promotions will be perf-ormecl ation scitatly 2) © chat —> Pt X®@ chaca—> WI HO fabs double | X@ totey — Arad X@ lent —> berg XO foetta— togrs CES Sting > oljet LS Stiga —> OljetCI > ee fo cout Of Objeat ype armnys Child cles type onvog can be | eusigned to pated les type array, tferverte varie. as Stategas = £4A% “et tet Objetts o=s; Cae Gi): Whervwrt we ove ausigning ome ereay Be ansthin awe Grtemal ekemretG werit be copies, just reference variably in be Aeatignesl, amel hence sixes are ret required “to minded, bet types E2t Tat I aw {te 20, 20, 40, «, Gop) eee eee —@a-s; - Gras Bea EN Toole] Whew we are. ausigning on array to onolleg arre dimensions theule} bee medehed fees, tf ne are eapecting 4-D array ne choutd provide 4-9 am q “4 my omg: Bq mritake a we one Previcking amg ott, Limersion ta, oes ne wil qeb ce. 20-4 treempatilie. Fouts Coe 7) en frre ven tHE I; Af = new fob IDI; wirect TLOTNO.S6 HARSIIA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 ie a DURGA SOFTWARE SOLUTIONS Xm C0I = 1; SCIP MATERIAL pi tnconpatn bap cfound : fate waived : tl CAR Dot anew tntted a Nelzi—WhanewA We are _ om array to anole array aud climontions chonte be medehed , bat sixed ave rot” Auquited “to vaste, €a: Clay Test {oe ps v main C Stringer angs) joe Tet xy acl L ot: Stringra otgh afta ei" e aryteatghs Jem Tak x Yel (os RYE] op: & fol Sting epatgs) ao é Mae) Sop Ce); jem Tete ope + 44 3 & cat hey Teak ~ L i vm CStivges “ys Ce el | a Cit t20; rena hemeth 5 tod) ale: a e 5 Sop Conga C19); Ret AT CORE 3 x a we replace” wit Ye! cgmbel Hay we wert at ony eruption. és iercaca teneo MHGILe os AlJeanew intlady —> 4 ACI anew fet fad, 9 4 tenes Mrs I02I) —9 + PLOT NO.S6, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-S00034, MOBILE:9505905786 35 DURGA SOFTWARE SOLUTIONS Bi Tokal how many objet crentio) 7? Aneto ey, otgect Agile fot 4c? pd be Oy vostoteg 2— Divicion © Raseal om type ef value represented] by « variable oll varias ote diviclel Pte 2 type. 4. Prtmritive vorinbly R. Referense. varralles A) Patmitive variates Jer Mr a=us 2) Referens Vartabs Js cam be weed to oper objects. Ghulent ss arnew Stunt O07 Boted on purpose § position Vide Tato «3 typy. 4A. Enstane variables R. tebe vost olds SB. Lecel vatinbles A) Drttoner vartobles 5 — Up te vel of 2 Vasielle Vakied drom object to object cuchy Co eleelarction a vartelles tyre of vattnbtes are Glad Erstente variates. DP Fer at objet a separate copy ef tnttance vatinkles wil be create, PLOT NO.S6, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 36 DURGA SOFTWARE SOLUTIONS SCIP MATERIAL > Enitonts variables wit be eveetid at the time of cbfet creation ond destroyed at the Hine of objec dectruction Yenu the «lope Pb instance variates ic en. fame as “Ha Leope aq object: > Trstemes vasiolss wit be stotect fh th Heap 6 pat op object: —? Erstonce varias should be cleclaved within the clay cireDtly, but eutzide of metted ot Mock o& conettnetel. We cask accord Pritamce variably clita tly deom static ea, | but we Can aceets 4 wttng object” reference. JO Bat from tritenee mea ne can atcery } tirestly. jenr cles Tet L fab antes fattomee Vartables Pos vo m(—) J Sop (tad; y OUP 210 pete void m4) Ee pal = olp rte y at I 3 . Fet tretemee vatialles vm wih provide defantt valucs and wel vealed be perpen fnftiabinction empicitly. tte tenen Testers (ea); PLOT NO.S6, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 oe DURGA SOFTWARE SOLUTIONS SCUP MATERIAL 9 Enthomee vatiolles are alto known as object lool vartalls attribnte 8) State vatiollu 2— > Te the value op a variate fe mek verted fre objet tb object such type of varia are net Aecommenctesl “bo oleclere as inttomce vartabiy ne have be declave Hote varias «4 clus elvel bey uting chat vockipis. }2 Pn te of inttante variates, fol eveng objet a Separate copy wit be created but tm cow oF Static vatialle a single cory will be crected ot class lel £ clarvecl thar py by ae objet ep tak clans I static voAtobs wil be crectid at the time of cba madi 4 hectroyed at the time of clay Unloading. Hence The cepe Static vestobs is exactly some as the scope of clan file. eva Tet + Stas 3M Cred & strat main Thread | ea cae ‘ethic. vattables + Lead Terk. class Crectton Eneeti maint) Unloasl Texts chars’ Stadit vatiiobls Terminati main Thread Aeehuction Shutdown Ive | static varias wi be soled freidle method ater, > static VatiaUs theld be declared outtide of agp were 4 wiltkin the class kitedtly, but method oA Ueck ot Constructol. ~? Stati. Vasiolles enn be accetsed line dtly from both tnstmnce and stitii meas, PLOT NO.S6, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 3@ | DURGA SOFTWARE SOLUTIONS SCIP MATERIAL eu das Tek L ctatic inf 1=103 Pf vo maint) Sop lady =D 2p oe vomit L x L S 3S F S.opta)y => ol . 4 > static variables can be aceartea ett okject veprevente nt bg Clas rome, but TE fe Recommended fo un cles rome. Witkin the tome cles we can acca stebic vertables olicedtly % Pe te mol vequited “ho ute cla rane. ev chess Teak © oye Pa ato; eos y matnl—) Test tenew Teste), Sop ay S-0-p (Tut.2); ue tee W357 | Pet static verials we are not reguived ‘be puporm fitiati- abien tnplicitly, Tvm wit provide chfowlt values, | ex- clog Tet © shatic ting £3 static tee al: Dee ye) X sop cy =) oly = natl Gy 2 at PLOT NO.56, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 34 DURGA SOFTWARE SOLUTIONS. SCIP MATERIAL > etettic vatiolles ane alto known as alas ed Vt fiat. €2t cls Tek © static tae AaN0, Cher) Pt y= 20; Ps vio mt) Test breve Test tea = Bee; Ely aan; Tat treneo TetC) + Sop (trat-- "+ #264); BD beat vatiolls 2— | are ares el aaa tae lee oe ee |e we. have ty declare varialus trsidle a metiiod of Meck ot Construct, Such type op variates ave collect Lecat vartabler & Tempotany voriobes oA Aritomatic variables, ot stack variables . Cu voriotes wit be cthed intide Stok memony « I> Local vatialls win be creatiad while erecting he Heck in which we cleclarecl thal variate. : [2 Once that Leck erection complelit automatic, decal variables worn be dectragert Hom thr seepe Of tecal variatle fc exactly came AS the Scope of the Locte in which ne declared thal variable. Ge dee Tat t ev mt) i Lee-feo} Teja Taegu pot Tot (ten!) J : PLOT NO.56, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 40 = — T SCUP MATERIAL DURGA SOFTWARE SOLUTIONS , jeot |. - 7. NFE e€ dali jae; fos; jr cate hl ) fee y op CI) > Fo. cal vette, Ivy wen't provide defautt voles: compultony we cheull perfeno _tnbtislinebien explicittip, betel waing tthe variable feat clay Test a Test =~ et ta v mt) Nateeeet Lay Op Pat 25 7 Sola); S.0 pete); : y 4 a y | ep = Helle cAny Testo chen Test ue & poo vmt+ | pov me) jo fe ns \ fray splargtngrs) 3 (vye demgttome) Lt ante) ae Ria stan a hee : S.0-plA)y lay, a 4 ‘PLOT NO.S6, HARSHA CHAMBERS, SAI NAGAR.NEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:950S905786 4 DURGA SOFTWARE SOLUTIONS. SCIP MATERIAL bolt-O TE fe news Aecommendect b puperm fnibiatination fot Local vortalles inside degical Hock? becox -thite i& me gquavantin, f& the enecubion of thie blcti alway ot Luttine, @ ah te highly creeommencted to peform Fritintixation fot local vatiolles ot the time % declaration athart witc eefoutl yoluus. Note +The onty opplicatle modifin fol focal vortoblus fs fino & mittake % We ore baging ate any oth, moclifin ne will — Ext dew Tat L Ps t vome) pellic tt amtey private tat ante protected fat n=10; Evensiont tat a=t0, Volatile tnt a=to; Static txt azto; 4 dint fat aetoy CE Sigal Stent oF exprasion 4 lle Ef We are. nak declaring modifin then % fs colefautls| oy cafowlt, Bit “this mule ie applicable only fot Pnttames anc Ghehic vartols Lut net fel becat variates, Note:— Fob frutemee $ static vartobles gum wih alway provide afoul Velues and we ove nok reqritest to perform iititinntion “ek Lecal vadiatles avy went provide — cefautt valkus Compultony Initialization eaplicttly Lepete ting al ; HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-S00034, MOBILE:9505903706 ar DURGA SOFTWARE SOLUTIONS SCIP MATERIAL, Ea chery Teak t faked a5 Ps vm) | Tat tenew Tett0d; Sop (t.a); => elp tnull Sop (bated); SE TNR. 5 pleated); > GEINPe) 3 instonee Level O trey a5 @ fated renew MtCs]} S.esplebj- 4); nud Sop (olj.ad; som: CE 302585 S.0 pou. ned), GENE) Lop (olj-ace2); Static lowel:— @ stsbic SHC I aanew itl]; © steic MCI a5 Sopa), Dow: LEsersae (Glee S-o-pCa); =dojp rout Sop (atea); 3EENE) S-o-pCaced); = oP a ° @ fntCd ~s @ intl ra-new MtCxy Sopa), areup: CT SCASAS S.0-pcay; Sop Cater) Sop (ated); (Ae oner ne execttad an array every clement by ce fault Tnitadined with, defaull values teres pestive of whet, fe fe static of Putanee RK local ana: every vatleble In Tava shouted be efit, primitive oA wforence 9 every variable in Tam cheutel be ecihir fritance ot Static A local. PLOT NO.S6, HARSHA CHAMBERS, SAI NAGAR.NEAR BIG C MOBILES, MADHAPUR-S00034, MOBILE:9505905786, 43 4 DURGA SOFTWARE SOLUTIONS SCIP MATERIAL > Hen th xfoltowiog whe various pouibl combinations op veritas in Tae. inet imitive Stak erence, local Ext cleo Tet L static take foto; ——> Stebe — primitive MWCT rene tls]; > tnttancee — reference Pov mey ‘ha se tedintgals a hocal referee. 3 Motz: — Tnetonce vorlalis wit be ttoted in th Heap shea chahe TT Vastaky oi be Stoted fy Methal tee amd lca) Variables wi be gift in Starts Memory. 7) Veh. method — > Util ig version we cantt dleckare ye ere Te a chomge ig ne. Of a compaltony we. Sheu} dleelre a new method, hich inove ates best ji Pf the code 2 vectuces a method — with veriokl no. of Te ovedcome this pretleny guns prope Thtroclutel vet—aty meted Concept in Lg version, a methed wits Hene rom vs version onwards we can cleclave vetioble ne. ef argument tuoh type ef methedt are Caled vate oq methoetss we can declare a var —arg method a4 -follos od roth FLOT NO.SG HARSHA CHAMBERS, Sal NAGARNEAR BIO C MOBILES MADHAPUR-SO009s NOBILE-IS0S905700 a4 DURGA SOFTWARE SOLUTIONS SCIP MATERIAL >We can ca thé meted by patiing amy ne of fat values Troluctig Ae numbel alve m4; md (0)3 ent (10,2-0, 30) gen Test public stab veld miCintr.. 2) S.0p (rvak— ty method ‘J oe ai) £ mio a eee ae Van ut C10) vaa— method mt Cto,20)) ~y d oe > Eaternally va eorg poroanetiy implore tid by wifey <-Aimenaionel on: ; ; i> Homer within vor—Org metked we con cLifferectinte arguments uy peloge tinder. dan Teste o ee ares sume; Sum (10,20); a] Sum (10, 20,30); 2) Pos ov sum (Cint... 2) bh total <0} FA Cint ay ta) Atotat = botal ty 5 43 SS. O-p The Suen r+ total); ‘PLOT NO.56, HARSHA CHAMBERS, SAI NAGARNEAR Bl 4s (OBILES, MADHAPUR-SO0U34, MOBILE:9505905786 —__1 DURGA SOFTWARE SOLUTIONS SCIP MATERIAL whicly te follow? vaan method declarctiiny me valid? + yoy miCint... 2) 7 e ma Cink miCink aoe) KX miCiat -.a)X mt Cfae oa. mt Cite, 2) Cored: We can min val—org parameltt ik notmat prramelit alo. | at miCint a, Strieg. 4) ma Cink a, fati.. yy Tp me mix vataaty perametis, with netmal potameer Win van any peremti. cheutt be the Int portamelr. mt. CString.» s, dou dA) X mi(Cdoule 4, Ctr... S$) WD! En var—aty method, ne on bake only ome vad — oty prem di4 otkepwite ne wl get SO. SU mECInte a, States Y) X Casey: 2 er clay Tet Ps v mACint 2) eos v main C—) L L So. pl" ererel method); AC); =) OUP t vty method ¥ MA(10, 20); ey lp ¢ vod ps vi maint... a) aCe}: id votnoky method L y D> OW! Genera) retied a pc - wmethiod)) 3 Seen TRAST eC PLOTNO.S6, HARSHA CHAMBERS, SAI NAGAR.NEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 46 DURGA SOFTWARE SOLUTIONS SCIP MATERIAL 72 quel wt any method sit! get beast paternity ney H v0 | tL metRacl matched tin oly vot aig mmetind will gob thy Chance, | Thy eroetly same AS defaull Case frsidte switely, | Corey? | | ex: dew Ter a! ps v mai(ttra +) | tL 5 ‘ pao wit) ACES L — i EE! Connect cteclare betty m4 Chick y ta Test ae eed ee | Cote? Whereevet 4-0 4 prvent we can replace wits vab aig poromete, Vea: mi Cto3 a) D> mii. 2) main (Stange 3 org) D> mato (Stings amp) Ww WD? whereever, vat—otg perramelir presrenl we cant weplace wit 4-0 . ext mi Cink. a)=> mi (itr ax m1 Cink... a) mCi CT A)X m4 Cao intf{vo,20,20}) > X mA (new tnbfte20y) <> xX mAc) = X m4-(to, 2-6) =x m1 (10, 20, 36) => X ‘PLOT NO.S6, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 47 DURGA SOFTWARE SOLUTIONS SCIP MATERIAL Note @: miCint.. 2) we can ent thy methee by passing ager % Int Valu anal x} WU become 4-0 fot amy. CinttI 9), Mole ®: mtCintr... a) We can coll thy method by patsiog a queup of 4-D Int onmge avd a wit beeeme 2-90 int arog Cin CIC I a). Ext ela Teal t Psy me) 1 Teta a= {10,2 co}; TOI La { qo, 50,6045 mda ,b)s y ds Pos v mi(intld... 2) L dr intl 4,7 2) he CayCod =) op ite -o-pCaycely; =) opi Plan aL, 3 3 <) mato) methed— Breese eae whether He clan conteing maint) method ot aot f whelhit main) method fe properly cleclered oh net teeta things wort be checked Compiles. “4 “% L> At auntie Jum fs vecponsibta te check Hate things. bp At Austiine vm is unable to -finel requitesl main) method thin we voit get BE saying, NofuchMethod Evral. ¢ main, Ext lew Test ae jeveac Test. jevacd LC y Jee Tete ‘PLOT NO-56, HARSHA CHAMBERS, SAI NAGAR.NEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 48 >———_—_——- DURGA SOFTWARE SOLUTIONS SCJP MATERIAL > PAE runtime Iv elways seartehes fot main) method wii Ae following proelizpe- | polite, tebe vera \ a) Tout entity’ — friaint-) mettiod ion it Te | a ie we et =, > ah we. porn am ony changes fe “the above Syntax ‘thin we wit get Re Sauging , NeSueh MethodErre s main , [> Eventhough tke above Spree ic veg Strict he -foewirg Champs are, acceptable. |@ We con Teterchange modifier dir. ier, Tritead a public. shot ~] Mt 0 bake stictic pallie. | |@ We an declare ae des in oy acceptatde form. “Te Calf by vm == Inaicle. tury mein (Stirgl 4 ons) main ( Shai. Clarqs) rein ( Gtatng rd) © Enttead 4 ergs we can bake any valid Tava ideatifir. @ Tretesct + Stiges Wwe can take vat— “a Ff porvometer. [rete Gohiges 2999) D main (Shing 08959) @ we can declare maintjy method Writs the followwtog mockifiers alte. fina fynchvont Zech Shietfp ‘PLOT NO.S6, HARSHA CHAMBERS, SAI NAGARNEAR IG C MOBILES, MADHAPUR-500034, MOBILE'9505905706 49 DURGA SOFTWARE SOLUTIONS ear daw Test SCJP MATERIAL { crate final tyrctmonicedl shricktp pothic vote mainGGhigy : saga) S.e-p(' Valtd main methed')) J olp = Valid main method. Qt hick oy te follerting are valid maint) meted declersting YO patie tate voted mato (Shrig orgs) KO public star ord Mato (Shiges ay) X@ puttce void mata (Shiges ary) P@D pate table ft maty (Shae orgs) @® ind mined cvict$p public veld main (Ching cy <9) L® fi Uae | Find tymebnonined Chietlp public stbic void main( tines | CD publee static vetd main (Ghivg.. op) “y) | Qt in which G -the above cares we evil get ceR q fins? We won't ee Compile Lime enor. ogee. Caw Ot Grerteacting, of the mafnt) meted ie peuible, but am voi cl Stringed exgument matn ©) method The cothe, overloootl metked we have ty call enplicitly then ie wotn be enecteep jute Uke a normal mathe coll, ent thy Tee GG main’ tracy orp) Y_____—_—— lL main (new ttl I {10,20} ot y So pC hinge gy"); Crain om ) « Pc vy mainCintcr ory) Ao SopCrinters PLOT NO.S6, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 50 DURGA SOFTWARE SOLUTIONS SCIP MATERIAL | An@! Toheritance concept fe applicable fot. main(} mettoac, | tence hte. enecuctiing chitel clus 4 chit doen conf ato maini-) metked then pated clan main) methet will be encode, jevoe Pjeve el Jeat pew P £ v main Chg ci <7) Prclany C.dlawy Joe pa 2004 pahont main J P youre cd a < . Zip: prsect main Cre? Te teem oversiding concept apical ft main (1 wneton bel fe fe ot overccteting ft te metiod_bicling. ez dan Pp jovae Pijeva ip the clay doen't Contain main) metkee until -6 version we why get Ee sagig » NeCusbMethoel Sree mata. > Bat from 1% verston cnwart instead of No luebMethoderret we wil) get moe menubar fit erect Tnfern ation, Ex: clay) = THE L 3 1.6 veaton peg vertiod - 1:6 vention deg ventio9 XK Gavec Test. jovact Youre Tah java! fovea Teste Until [6 version bo mun @ Jam prepem maint) method fe not vnemdatery bub from tet version onder maind) methad manctecong: J? Ceentiongh We ane cefining Contain eo Static Mock if the claw ctoen't main(—) methed thin MH Wort be executin ex cay Tue Stable L Soup (static Meck ")5 o rs version bx vention | Gece Tete joved fjeac Teh joved! ro IARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 oe DURGA SOFTWARE SOLUTIONS ‘SCJP MATERIAL Gove Tect-el dave Tect = static Mock Eqadt Rain method nel found ke: sul tde) clay Tut, pleaw olefine HL main meld al: pelle tHaibic void main COhing C2 amy) main i Static Sop ("static Mock"); System, enit co); af 3 Le _verston (ae vetton jevec Tut joven 7 jovec Tate fave! jee Teetel ve Tete Cl stots hoc) (Cans Mad method rl ee ae Ext clay Tee { (main mefboo} ) awat}ale) Static ¢ i nreml flew ia pC Stetie Meck") 5 else ay - 5 P< Vv moatn(Sthgcr args) aan ' aan L Ye S.opCmein method ); 4 Naversion J J 6_voar tory l Aroree Tete, joveres Ajorac. Tet. fovec PLOT NO.S6 HARSHA CHAMBERS, SAI NAGAR.NEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 53 DURGA SOFTWARE SOLUTIONS SCIP MATERIAL jew Tettel joe Teta ( habe Meck ep : static Heck main method (#: mat method eee aed ets 9) Command Line orrgunce ts in pP TH arguments which axe passing from commana prompt ave cetedl Command Line. Peete eu jee Tee a ged e/ anys cd 1 Spe SD Te main puspoe of command Line argumertr is ne con customize the behaviour ef main) method. e@: fe Test Ps vy me) jova Tet a” RB cel 3 te _ dengthe 5 Prt) 3 fs tumuary +0 cra), 3 pny joe Tat 4 2d j as RE 1 ALCORE aps A Paar’ c Ret aTooEe t dot Cit i they we work get ony ge, - md Ps wv main (Gtringer ngs) ery L Statacy eghe fixity!" om a PLOT NO.56, HARSHA CHAMBERS, NAGARNEAR BIG C MOBILES, MADHAPUR-S00034, MOBILE:9505905786 s4 DURGA SOFTWARE SOLUTIONS SCIP MATERIAL | fot (Steg et mye) Jewe Test #@ Cd L aoe a y £-0-pL)s z ory jove Tat 4 @& a op: 3 oy oh z Jove Tetet on. X& = ¥ 2 I> within te main) method Command Line argument ae | ewellaMe tn tty chown of Statng elem Test | ue 5 Test 10 20 rf fe héghty wecormended te follow conti Standarch, JP here we are writing any ely ob method tke name Cheutd Telecd— the papese tral Component: a PLOT NOG, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500038, MOBILE9505005766 os a DURGA SOFTWARE SOLUTIONS SCIP MATERIAL Thy approach improns vende bile 4 matictainabilil Oo be code. aye * prekagp Commectga celts eejPs public tat ma (tet i, Tod) ln clara Clowlator t webim THI pull: ctatic tht old (it numd, J L Tat mura) + rele num A rem 5 Arm eaxpet Stomelarel ; y Hitech city ktaveord Coding eowelerels fet clases +—~ 9 Ue vat clan noes Shoeutd be nount > Shows Starke WHR Upperca. choractit $ if- mubtiph werets every Tomer were chon cterty waft uppaente: Chorockit, ie Contedtng 2 Used RAD fece nents are adjectives, ? Should stant wot uppcae chatactr § tk tt Contates matte Toner wore theuntd Stevti woTHe upprcase Choracter, woeds ever en Runnalde Rendon Acer Sige’ Threadtoctel Adjectives PLOT NO.56, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 sé DURGA SOFTWARE SOLUTIONS SCIP MATERIAL Coding ctenelarely fot methods -— > Vsw metheal nome ote etthin verte of verb—noun Combination | ea: +=) verbs > Method names Should Starter wits Jowerteasr character 2 if TE Contains mubtipt wWovels every fon word held Clete wil Uppicae chatacti Corel cam convertion), etn Ltomclarcdy fet variates -— > Usu Vatiole names are nouns, [> shed cher swith lowtcase chatadta 4 tf it cotati malta | weerts every fants weve chould Sherr witty uppeicare chatastih. | Ceamet— carve convention), cs | | | | | lo iS Keble Numbet nouns " Codirg shemdancls Ger constant > Veu constant names ere nous, 7 Sheutd contain cad appease chavaclis avd fh it contains > mubtipla words thio each weld ix fepateted Wilke Undurccese ee Ye l le 1, ie ' PLOT NO.56, HARSHA CHAMBERS, SAI NAGARNEARBIG C MOBILES, MADHAPUR-S0003, MOBILE-9S05905706, I or DURGA SOFTWARE SOLUTIONS SCIP MATERIAL Tove Bean Cocling standancls i— > A Teva Bean fe a Simpl Tove clang rt private. propectiy owel paldic getter, £ collin methods. ent cbs Stuclot Bean t Qa private Shing name; Public void setName (Shi rame) L Ri name anames ie GHaieg getblomeC) e ¥ 3 Lynton ft Seti rnettiadi— > tH thoutd be pull meted 7 wetiem type shouted be veld. PTH metiod name cheutd be prefiaed With cb: ? Methed chernbsl Comprlicig take Some argument Sartor tot getter meticodt>— > H Shewld be public method. 2 THe rllien type showtel not be void. ater Method name shoutd beprepired wilt get Bheutet ne iy hes enqeonent mcUrag Nolet Fot the boolean propertiy Mmethad name can be prefirecf wit eft get of Te amd retommencded to ue “te Private boolean empl |em boolean gerernpty 0) relive nomes PLOT NO.SG, HARSHA CHAMBERS, Sal NAGARNEAR BIGC MOBILES, WADHAPUR-S00038, MOBILE-9505905706 se | DURGA SOFTWARE SOLUTIONS SUP MATERIAL Coding stamoleves fot Listeners — 7 Method nome Should prefiaed witty add, a OH pullic veld aclel My Action Littenet CrtyAction Litkenes, ») XO public void register My fecttorL itonss ( May Acbin_thew. a) YQ pull void ada ActionL stone CActiont thon, Ly) EO! Te umegicter a Listener 2 The method nawe cheute prefirecl wily remove. ERE public vol rome Mi Aetionl itenss (My Aetion tenes £9 KO pubic void tnRegister My Action sstenes. (Ma fctionL istemet Ld) K@ publ — veld momne My AebionL interes CAcbiont istonss L) xO perl vei! deltentyAchionL itkener (My Action Listentt Ly) PLOT NO.56, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786 , ee DURGA SOFTWARE SOLUTIONS SCUP MATERIAL 500034, MOBILE:9505905786 PLOT NO.56, HARSHA CHAMBERS, SAI NAGARNEAR BIGC MOBIL 6

You might also like