0% found this document useful (0 votes)
39 views32 pages

Java 6

Uploaded by

Geethika
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
0% found this document useful (0 votes)
39 views32 pages

Java 6

Uploaded by

Geethika
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
You are on page 1/ 32
ca . wscag, tate ake oH q Face Hey voor vse. can folly ab cor DB Tlerfaces ave Syrtactsenlly similar to clayey tack instance Variables and methgds Are rack | fat astra: . efarten ONE Syatattienity Seti toiclanses can have Methad, ond! Variable Por the Je ctavedd én) Vanteaidce? Biel by eefaulk ashes enferface method (only method Aly nature HO hotly) grkerfacs Specify what 0 clam MuUAE do and net iy Me the buepugt Of) tae Cows frou sy tox * f nce name f Vetus pre method-name ( pata Ui a ( ve n— tube Hod -¥ t - vernarie|) #Vabue ;//) net) ave by default Final and Stotic is 1 mame? = Value ; as aie trmpliatly Public: 5 All methods , Noriables are tmp’ tly 4 elevate Creat \ Unertate q | veank ete Le Scanned with CamScanner VnBT “pie Be pupiic clay £ Sa ‘cterttt? vored mamn( ring orp oe Aloe Sane AQ? ’ ae _ 4 ob catback ey A. BE cmc . : void callback( (nt Ps. 4 , ‘eta. Bo fenplement® calibackf oierfate we ord pubic, pid Call barkfint pf , - Systero outsprrtr (Inside Cet 4 coe % ofp Kem ™ - 45 tee om : extending wok outur: ‘@nside Gla PAvaind’ Valine Of P's 1 5 x wh pribliic +a ed ~ multiple Gnheritanve : Teck Rablic clas Tests Pubic Static Void Wuin( String args q 4 hr ob = New AC) ob Callbatk(s)) ob kitecall(); ai % y WHET a tn terface Cat back ¢ Ya ht ea \ i Noia Gall Back( tint P); i q | J s Wterte Clay # implements Cathack, Kites ae Scanned with CamScanner, ne Voth callback (int p) q poe system -ouk «prrotin (“ onside ‘eta @’and Value of poly aot void kitecall (yf System -o.ut- puatin|” dnside Clan & method ok Carerbace kites") 5 4 y imrerpace Kile t Vord Kilecall ()) 4 + Fneide cs A and Value Of Pa:s outpat Aand Value -syiside’ clan A> method OF into aa mair (shang carp) > ew Indo); v tamer ee ' innpements cow hes 4 Scanned with CamScannerpublic etd methiCoe i igsvenyin Cmperneds MAPA io ‘i i ? piliic void metaOt : 4 abstract te Co lengtements mans D> (aie a BATA extend another, 4 = publre void etna . orl, tenplement 5 een impements mens!) > | yavo COleehate mplernents “me! 4) fo. obeerad output t mplements men? : extended, uate molement + clam aie QA Sav abd ct clon nerfate Claw mernt Abetroct clam can ha 2) Aplerface can have. 2 only absrcact -WAeteds RepieieS abstract and 70% : a s . ‘ava &) 3tGdn tow Ae and Atahie mebig hem “ “ Palduc ; ober 2p ports, Abstr ; —— — 2 r inheritante J { ; i © prow me VeX 70 ne miple meaton leer a7 uA Scanned with CamScannerabstr - the abstraet’ Eenoord +h lied 3) the er at to declare absivast ctom Us: Used to cledlane! EAterface + An tolewpce core extend anotner joe Colerface only Loord yan abstract clam can extend another, javarcam, orch Implement mutieple yavo COlerfaces y an abekratt clas” can be a Aan interface Cam ke : exended wing Ney sort ented {implemented aing M Hey iors implement, akehack clans Gan have #) Hlembers Of o faval enterface are public hy dejautt 0 QA Sarva claw members Uke privates can have ted 8 t ometnod yor aloshratt claw shapes Public Ee jlostrad = Noid drawl?) : Noid dtd), i iS Suppor } : i Lint altows' a Rubdlais or sr fe eee of a method ah OF over 1 : jou : te ’ mentation of fn Oh x . a pa teat by one OWE ‘alee’ glexetuied will Be. : y red 4 invoke! if a po ee ve te metrod? E t i wed to uvoke the wo mined NS eA aie metrtatior lee tf LAK Scanned with CamScannerBoaane ShCogTOlCer Bers .dagsnlty. seppoct regular expression while Spilt supports it a) The Shing Splto metincd rebum) GR away peming CD) aNd ‘Tokenizer “returns ONE, token at a Here whith, pnaver, tb) cory to use a for each looP slits method fetus _Gncarraly gp The oh} 5) The shiny BKenizer detent Randle erapty shongy Spu t( aoe welt But thant! ktricg roKeriger Scanned with CamScannerPe FE commute construc & 0" Constructor ‘th program 5 (CHesaay) cejault Slug | genplit width} itt owe 4zltng buble Reight; awe -foomal param double depts Public Static t requie 0 bdo void main [Shing ais 4) Aas) NOlarys potato Map atne claws! 4 Scanned with CamScannertere Te we LOTTEET OMe, constructor tn oUln program. | fren TOM Cea ay _dajaalt commuter! sill “net beradled j 80 tne Naluax) [T geopliit Constructor Will not fe oddeA 60 Compiler pill Ask delling frat Ene actual parameter Gist ond 4re formal parameter Gist t& mot matching and tyre af Prerakeler t vequue 9 double double Kind of argarnelts ride igs) gous) nov args Conshuced is not alinwed Becawe ex only one conbtuctor 1 Actording to thts = q te ronanuctor only We “have: to Call constructor use itl oet error \ 14 => fF the act formal argamer nome ate also same inklavve Vanables> output 1 80” compiler conguxed vonich © instance’ Variables , which A Ysrtt vail not constnielOr Overloading * Scanned with CamScannervale Shallow cord we issn objects" velerenice! Vari bles we-can Game none Object: reference to. an, MFGiatlatioo OF SB) clan tone Object eth envionment Yara Sen Width = 2¢; y \- SaWA— Home? fy Iss , claw Tat C yaa HOWE 18 Pubic ae wl jocation vf the. Vow KimainCsring avqic3) f Bor _bi = new Boecy) toh § a: Patras TSox bs bs athe path ic + eyes gue et > fais ! Systery Wea tp bre object spolth,, 20 Federence vis Conmmand une Pty [or cats hes jee)” 2. PEN (a 81d NY «9 TJAVAL Home six bj width = (00; sofasdtena’gg p69,( be I 00 that4” exatl bp swld4 pkin ( bi-cotdth)} 7. pee as tn In which a | bl =neatt [5 a 2 | > the + tail, pot losty for Wicectony ur Mt held we ned 40 4 5 by-vodin | 36 fadincac] $-0:pln ( by-waddn)) 7 bb > ALC file ( unlime Gecephon > Aaa inte ener Caluad af ) Th we are nO Null pointer Exeeption 1, S. outuved hen we try to aces cE with the vetference variable Fraving Nall in it we Rove qe dt A 4, T+ Sours Scanned with CamScannerAiniatoo Of TOK: anctrey. ironment Variables bject Vedeverieg env + AA— HOME * Sava-Home 1S an Enuronmett Variable set ‘ the jocation of the "Java directon{ On” by cernputer coe. 9: pain > qhe Paty ts the System vaviable that our pecting Wer" to “Locarte Heddle” executables from the spe une oF enmbnal window conmnand fe Votvial} es Savas Home + wi.catlédyios9 clawpath , where &4 A sue need to find agave th’ Gog 40) ‘get Gogtware qt g ai exact” (catior + Scanned with CamScanner204 [2030 String Coltege Mame = SPT 0d year 22999 bach Void SHRI VISHNU ENGINec Ria, "24 Year" SOUGEEY tc )6 cee) System Cut printin (Covege. Name) ; yo MEM: Cut printing, i detatlscy¢ Ot: Printei( System out printtr System: out "Stadent detaile’"))5 Gh College Name Cate, CG Alene ‘cd 1 SigStem Gut printing Branch: "" -+branch) 1 J ‘ | c Clas tucentetaile extends dent $ t String d_name; Sut) spk print(n ("Istudent Name "stu of \r) ar out Print ("Reg ister Not + pred ) stem: ou 4 Scanned with CamScannerQYARNNOU PANE DF avec clan THE pubic Sate Void wnain( shang arBe) FE Gacdent “oll ate! tsentort), squcient Deh eiedentDelails, ob = new cAudent botailA(peethital!, 523) obs new, Student atatl(igeetnika 5 acd Yeo HRI VISHNU ENGINEERING CoILese INEE DING COLLESE vigHnto! ENS Scanned with CamScannerale Copy Constructor > A conshuctor that -lakes an Object of itn Clay, @ 0 Parameter very Cony Whenever ue Want > Create a mew objec « trot (E fnitratiy The sare as an Oxi _ ect 7 Bore..can. be Inany.ekpling object ube x voant fo Uke one among ty etthog CosGi Orjects , bo COMA “pe wilt-crente ¢ ve _ OTe COM racy. b we vwllt need One Spy COnshuctor in OU prog, a Wren the eristing Object ws ty Complex, andue J Vee Iblic tmnt novoliy Creaked, object to te [Keane exiting Man 4 in, 4 30%, object and enuitng’ object is rey compler colt ai ) 0 . box aus Uf will Very digficult fpr wtp achialy paw aL those pavcimelers Ken Wikion value by valu oF Scanned with CamScanner

You might also like