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

Swati Java Assi2

Java assignment 2

Uploaded by

Somesh Shukla
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)
10 views

Swati Java Assi2

Java assignment 2

Uploaded by

Somesh Shukla
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/ 5
mh Issiqnmenl -O2 : plain the concept of package in foe A java package f& « group of simil shes sect, plow be te ‘ ot t 4} Tackage in ave can be categorigec, in tro form, built-in pol and uc achineal pole f » There an ma built-in packages such ae fava lang, ant, favax, suring, ub, sq) etc. 0 Avantune 6} Taw postage 2. ) Tava poe is Med fo cobeporige Hu claucec and Tnfefact so shar ty tan be cally anni ntained . 2) Tavo package fovias eects Paoecie 3) Javon. peg barn vee em collision. Da: tons Tava package n coub) package: | jave clans £4, vee athe prckege Keyword Is aced to cuale pockae in fev. > package muypeck 5 : poriie clase Stenople t public stale veld main CString anges cyt Sipe out petntn (* : latelcome fo Package") ‘ An Abstract clon | Snterpace 1) Abstract clase can have abitvact |[1) Interface ean have only obdrack | and non- abstract methods. methods , 2) Abstract class doe mol 2) Interface beer sbpperte Aup pork multiple inherttanee. multiple inheritance 8) Abstract class ean have final, ||) deterface hac o state mon gira ; thee and non-shaHe | and final variables. Voutables. | 1 4) Abstvact class can provide the i >) Smterface can nub provi ae | Implementation of Iterfoce. | the fnplementstion af abetrack \ | | | | clacs. sy Me abshract ord it used i6) “The dntecface Reynor is uel | declove abstract etoss, ‘|e declare frlerfack. 10 An abstract elacc can eclend ander 6) An Interface ean extend LyYava clase & Teaplernent muttip le | another avo. interface only. Tava Srterfaces « i FP) An abchact clad can be extendid IP) An Suferface can be irplment using keyoroed "entends '" i ed keqword. MTesplermenter, BDA Tava, abstrack class can have dea | 8) Menbere of Jive faterfaug wu members like pedrti private , protected ete purlic by defoull . 4) Geanaple 1A) Gcamaple ‘= public abstract ciate Shope € Public faberface, drawable € public abctracr void ow C5 |] veld draw ¢7, 4 ig Qus3 - Write a note on AUT. > fm s- AWIT stands for Aestract windows toolkit is an tpn [regraransing interface CAPT) 4 veesting Graphical user terface COUT) m Tova .$t ollous Java, eta to lesley ui ncleur~ bas ub applications . 34 AWT tvovidus muteud conponunts dike button, label , checkbox, ere. werd os objects trate a “fave pegram. AMT conpontnts Ute the BeOS mle spucatin g astern phe, ‘they ae platform dabend ent whith meant, componerr's vitur can be chi ud decor ding Te the view of tne eae system The ctastes for ‘ AWT aae prvidest by the Tava.awt package te vcutt oun, AWT components. Const dey The fprllowing Granep le ny Java KUIT 3- insport fava. avot. # 5 pubic class Avottrogramt x pucatic grt fragramd C3 t Frame fe newFrame CY 5 Button bin = new Button ("Hello wovla") 5 btn, cer Bours CEO, @0 ,100, 50) 5 fe add Coin) 5 f. serSize (300,255 fe cer THe (" TavaTpoiet *) f. set ak (rl) fe servis? ble Ctruc) 4 4 public cate void main (String C1 orgs )t cqhetPagrem! owt = now Rust Program L 4 y E s- Daaw apple lifecycle and indfcote method used. A fF s- $n Tava, on applet is a special Type 5 prgram éembidded in tne web pq yo generate dunamie content . Applet iho eloss in Java. The applet lifeeee can be dafiaed ag the process 4 how the object ic uated , charted , Stopped , and destroyed during the entive execuHon eK plication . §$r basic has five core muthods navel tnkc) , slarkoo, stops painko ancl olectroy(), Methods of Applet Life cycle 8 inh ef Barer Shot ey | Ae a porary 7 shark These ae { methods of an apply fe cyte, and they wu s~ © $0) t- The Inte) method & the first methoc fo vun That fatiolign the applet « © ghutoy + The stake) method contains the actu code the appler oma. thavts the applet and starts the applet. fi step 0 + atops Tm execution rh teeopp let. # dutyoy (ot dustroy. The applet after ite work i “dane ' paar tit elongate the Graphics elute in fava tb used ty dvaw shapas like etre, Squom, steopertuna rete, Ques s - Cxplain jave dota bose connectivity in details. Am - TDC or Tava Database Connectivity Ba Tava Art “fo connect and execube the querd with the database. Jr& 4 epecification trom Sun onterosyterns tne pavida & standard abstraction fer Tava applicattons fo communi care with voor datebats.

You might also like