Download as pdf
Download as pdf
You are on page 1of 94
‘Suggested Broad Specification Computer (345 preferable), RAM. minimum 2 GB and As onwards per ‘Windows / Linux batch size Resources used Remarks any) Nameof | Resource _| Any other | resource used Practical Related Questions Pracratow xiven are few sample questions [07 reference. Teacher must design aaave such questions so as forensire dhe “achievement of identified CO. 1, Write installation directory path of Your directory? ' fh environment variable? " «after installation. aS red as static, Justify. 2. Write value of patt 3. List folders crea 4, Main method is decla 5, Program is named will Hr class containing main method. Justify. (Space for answer) 1.3.0. -4.6\bin. Cr\ Qrogtam....Aie \.Javo.\.ADK Gi\. Pogo Bie ayy tak {i3.0.-60\.bin Tinta legal. : i ip Gone on V2. Fined... FAW dnd de. cool bs. Miharashira State Board of Technical Education exercise Avrite the options provided by fé javac 3. javado java 2. ja 5 List different versions of JD 2 Teac the setup using similar erences/ Suggestions for f ratps:/wrww javarpointco ftps: //www.gecksforgeek pttps://www.youtube.com https: //www youtube.com Ref 1 z 3 4 XU Assessment Scheme (Performs = \ Process re Al fi [1 [eee format Al... jal volar. rush 2. | Debugging abi thea he in... pram became ie. -», Gathe... Called... i Product r Main.() “ ; |< eaeeeaone Beaty. ie ald eel a (S| Tiss Subs ‘ae ood kee a. (© [Assverios Y —— oad \ ad To List of Students ‘Team I 1 2B Be 4, — Ma | Process Related (3s) Pw separate prearam satemeng il is oe 1a if statement. ds Je mulipte conditions using ifstatemen aia nen ogra to che oT "ae void main ( Stvingl£I args) ¢ fiblie es Which of th . a Assi , Wot »). Bes Hint fesittve ”)- else fd > z < => f system. out, Pint negative * if else iP (n==5) Sisk. out. Prioln (“Soy "), qt XI Result Output of Code); " Yeferenc, Teacher must MONE Of i leet ‘d CO. er ll ne ison, fics gui) —— nya Denn EE Exerei oe SA) Gemfaraten.- / vl tse xt. yi. Exercise: 1. Write output of code in the given space eo Ourput | public class NestedIfExample (77+ +H} td) [To ic’ leas publi state void main Sting ares Atte, int num=70; iftmame 100 System.out printin("number is less than 100"); iftnum> 50) Novis Greater | System.out.printin("; ber 1") stem out print number i greater than $0"); thon Bo | D_ class Statement { . | public static void mmein(Stingll es) { 0,13 +Ve, | int number = | if (number > oy; { ra | System.out,printin("Number is positive."); This Sta ‘3 System out printn("This satementis always | QlWays aie | aie | 2. Write a program to make the use of logical operators. 3. Write a program to check no is even of odd. (Space for Answer) eo). - Bm...Glose...... lest. 2....... ’ ie Stolic..... void... main..Cebing [1 .cage ) a tok. Mendy Me ...yB= KS. boclean neh: ! of : result = Cnt 200). (ECoaz nt); 6.0. P(" Resatt).; Itharasira State Board of Technical Education Lp ' SeP CM addl'; j j yy. Referene 1. hetps: A Glogs... 4 : ti Wo BEAN. Mat onontd00.CHhing. £3.08) £ tort poet : , : = lo. ; i b= Cower= = 1).290 2305 Gyaten. our. Auta ( ee oh Anos +a): =.(0.==.1) 196+ i Gystem..ctth. balla Sy ue tee ene Tt cea ol ol nai ul inven) t axa (DE : sncecosel: Vale 1; smu); eaten. our pil on 2: Value isi "Hum ase oat pritn( "CS System 7 Fee nba ced: Valve System out ie cs fny*Default: Value is: "*mUm); tem ou print fae . eee | pute class Program { erv07 | Pe sta vod maining | : value = 100; duphi int val | ft Te oem) | Case toe : case 1 jade eVoy ‘System out printIn(true); | ‘break; | 2. Write any progran PPE heck switch-case stay “ment using character datatype (Space for Answer) I in ui it. tea hati, thd . Practic, Nate: tai, Shing... ans..)f.. Ria eal: fashra Sane Bound of Tecincal Education a 2 { hie ie re f oo-n.1-+ wC pes: eandition with for loop. {© display Pyramids of Stars/patterns ) (Space for Answer, Void “in i Shing. C7 aygg) { nan fheoladinglo uled if condition i talse (Space for answer) while a : : OT.....i6 enty... Genbelled Do..ahile.. lea Ort ie nth focal ; Gondiien AR... Lnen. a ad of. : loeP... re TRe.....loe?..... Shatemmend. execule...onca._ do.s.tdhile... oe. execute ence ES ee sitra State Board of Technical Education Prageemening 2. Write a program to display nu y. References! Suggestions for Fur ” 1 https://www codesdope ce ve 3. tps 4 haps: XU. Exercise: 1. Waite Enor/output of ode inthe given space. ee sn SHER. OU - To hile Ci 45 ! r int a=1, t P lie : 3 hee printin(a); fee | orate Nee: | while(a<=19), Ws | an TER ere a | Public static Void mainy : a System | semoutprin(1, System out py J while (alge) Maharash te Board of Technical Edu or in al lied i, 2 Wee program to display number | 40 $0 using do-while loop. XIV. References/ Su; Wv=lIX6eLed 730 Zr RDs:/Aeww joumaldev.com/l6s36/ave dosti mersbook.com/2015/03/dlo-while-loaps Joop 4. hups:/begin in-java-with-example/ (Space for answer) |. Practical Related Question Note: Below given are few more such questions so as t "List different data ty 2. State need of typecas 3. State the data types 4. Write two examples nal) 1x. Resources sed (AddHTC { { 13 [2] | [ET veciane | wabefad —___ Program Code: Teacher must assign a separate program sta 5 Pe parate program statement to, Develop a program to show the use of implicit typecasting, } a Costing { | ublic totic Vo mai Sha i patie ‘ ( a orgs) f Short e ‘ Nie Tyfe..Gaskt Safe) et OFC Short Re... doko alii hort 4b). me ae ‘ ENSUrk.... “ty a, hte), ty Ayleeabtiog,. : Wing. x ee 3 double.- I. Practical Related Questions “ Note: Below given are ‘her must design CO. +h boolean datatype is implicitly casted. 4. Write two examples of implicit type casting, (Space for answer) Tyfe. Gostin« OY. on AVPeCoOVeNsINO....1S NA Foe CRONGING sen. 8AM. NED OO. AYPC 4, cnet Th NB ellB6A eRe Casn Cuter oe to POSE NOOB MME nnd cy VoeeG OHO. Ona LKOENRIE Ayfecabting Ne.......6anverding......00. Shing... 7 : i ocasged. Mira State Board of Technical Education ass Testi ‘public static void maint inti ‘System.out printin(" out printin(” Class Povent 4 Void diotlay ¢ { 6.08 (t 4 fabic clos t Rublic ee G4 1. Exercise: {+ Wate Error/outpat of code in the uiven space : a mt class Test{ im 7 oe public static voi i oe ee = loo | : Ploat = loo.6 | Systemout printing " System,out printh Float value oe | | | [Tncofotioble Ayfe. a | ab Se | foimplicitly typecast lower range datatype to larger storage size otf Void dioPlay ¢)- ‘ S.0.P CY favert dioP called "); fubic close child attends fonent oie + Public static weid main (string £7 angr) 1 child 4 B= new child 6; C, disflay (; co Goof tra State Board of Technival Education av rognnng 288 —— required caaaitions wees vant, Resou Nil resources wo (asattiont J. Practical Related Qu Nowe: Below given w % e mong sch questions: se) Name of That is casting” No. Resource ‘2. What is difference + 3. « What fs narrowing [| Gof Ti tei + — “| Reeaurte —‘! [Nate fad_ parate program statement n Code: Teacher must assig X. Program students. Datclon program to show the use of explicit type casting Gloss Gost fiblic tatic Void main€ Sting CJ qs) $ Ree a Ho: Hoot PL (DoatNd ; fong = Lilt ink i= (inl; ; ’ é ial : ed]; 4. : ats Float : 4 £), Long: "41); QO Tngliot J Ore... done by... the @ Widening on €...No. Aah I. Practical Retat Nore: Betow gi fed Questions E tonne fe sample questions fur reference Foucher must design "88 at ensure the achievement of domifiei ne ing 2 What is differenc Pelween implicit and explicit iypeaning? lic and explietiypeestin 3. What is narrowing? "i (Space for answer) He Alb nny... gheane ae Bopomghieck. ol ONE... fouticulay..... z BO i h...A¥O...., nether, objec. Called... Cashing, Oct. ated 0S. on Programming E auttork , AD. Explicit enVersionS._. meQuire..... Progratney AFA. anes 0) Navrewing,.. dost vol@) bale. may. he iby eee sae te. 1 elt [clase Tear ses i ‘i Dubie static void mai byte le result = (f roverlpenerh r Pablc ey eee ofcodein the given space amo Public static i main( Sting) lobed = 100 04 args) Hoable (00 oe | long “ long nay iat (ny tat System, ‘OL printing” ible Value “+d): YS out print Ln(*Lon, ea fac 41): System, Out. Printiy(" "Int TH; i ols Fesep | Piet atic jold main Sri, eb = 59 mea es()) (byteyp + 2); Ss Stem ous Print, 2. Write program to convert variable of basic datatypes and lows tes pean basie datatypes and shows result of explicit (Space for Answer) = Maid “en 1 = t B.0.P (child. dictloy.") 3” aid.. main (Shing Clogs). hira State Board of Technical Education don inate te oremen } oe a srence) Ganesan ernets for niatze te an members embers. t Sat y aditional) ut, Resources required Specify the situation wi Nil How constructor overl tional) 1x. Resources used (Addit Program Code: Teacher must assi iat a separate program statement ¢g 4 siden Demonstrate we oft east vo types of construc (loss lrg yo hing ax [wid set name C Shing) guage), | fNamee¢; A F oP (eons hubby Called"). jrateae (Shing 4) : fame = god getName (-) Sx ; OP Chane . oo bs / 8 . {2 VY mCshing oy a lord, v Pap, "8096 jon. 8 longtag eg CPR * flew et Nome(y. CPP. 4 Get ae, ety. Programing (22412) J. Result (Output o Couey XM. Practical Related Questions Note: tow tven are erences Techer amore such questions $0 as ta ensure ‘the achievement of idemifi - 1. Does constructor return a value? TT CO gr StesIy stu whe ie deta coneiucior a eae aa oy 3. Specify the situation when the defaul S philips 4. How constructor overloading can be done? ad oS few sample questions for re lust design (Space for answer) Welton... Contacte 1 Deke. NHUA. Nollie... Yet ih aehwas a Value. Is Gorrech Bentence..... because...th... 18. poh ine Hy. Your......Gedo,...if'9 Called by... the... memovy. Allacatisn......and.. abject. inittaliZation wk... Code......in...... the awn~Fime, Qo...... ConshuChor CON HOVE Qo nD type... Gut... hold Ma APHIANG,..n.Bernething, and You........don'A........imPlement OY... Conshuetey iO... Yaur......Glaos,.... the.....J aVa....... ComPiley....dngects default. Conshucter..... ike YoU non Oddo .....OM Your nebaly.,.....YoUl.....lAull not Ske default... Consheuckey,...iNo......Yyuh...Gade ON... You Sotiyea Coda. 5 harashira State Board Education bsereae F 1 Write output of coc le "gases FE | ime t class Main { public static Tul =nev A dition, Ty F overlaa aa ; ae le : 7 java...... Ovex neu j TF Not thed tia. the... fovamete Be 88 to Point pl =1 Point p =n System.out. System. out. System.out System.out 3. Write a progra of complex nu Public static void main(String arysf}) ‘ Tul =new 70; ‘System. out printin(tt.a); » i Modity the following program to execute without eror. Sie which ‘constructors are used in the program Point Point p = new Point( System.out.printin pl.ms System.out.printin(*¥"+p1.m_y), 3. Write a program to im plement different types of constructors to perform addition, of complex numbers, (Space for Answer) Gonntlex. £ loa ge..}. __-Logntlex. ora ‘Conblee Cink Loo thio Reals. Real.4..3. imag “Tmage ie ; le: LAcomPlex, CcomPte...C\ -Comflex, all COum..2¢0..=..Cl. Préal.t...62. Jtol..). Coun. image. =.ClaAmoge. tC 1 mage s Netiv0...... C Sums. . cee ! ‘State Board of Technical Education suns | Ret ums «string Feplacing apy quence t0 NeW char yr hate eee nce: if this str jes returns index of, public —aatiod urns index 6 i Jule of substrin jew string that is ay in indenortint 6 1g that is subg 0 en String Buffer class 1 rttvods: No] “appends sp [| StringBuffer append Sen eBuifer ‘i [& [istringButter sb) A Gaiam inc 3 ng SiengButer inser at MTS | ott cf | Sting stp [ void setLength(int newleng | The character at specified index ora | void setCharAt(int index, char ch) tess Bultents chine pone) Same bufisnds Shia | Reverse the character sequence tringBufer reverse) | StringBuffe: , VIII. Resources required( Additional) Nil Resources used (Additional) NY cae, Fy ‘Name of | Broad Specification Co Quantity warashira State Box 4s eeram Code: Teacher muse assign a se 4 students, Meee ET sO tine oF mina 9 String class, Class Tegp £L 8 Ve MCowin PAFAe BrOBrAM stalement to group of 3- 9 C1 ows) f : 492, equoreces) i 2" toh meloce 44 on'?)); “4s Sh, Subshing (y, (2)); 46h) talouerCose os cu Offer Gose's Mots feulleicase(I);, Gop Trim, *74-83.him()) f 8.0.PC" Seorching ; : 114844. Centoios (si); a Board of Technical Education Programming (22412) A Shing io Cloa, 5 WM GVO. Poclo: i ..Kackoges. Qos) VO fookages... i ‘ou. of. Gteniloy...... pes p “Glasse9 a aio rae Res 6. No9929,..,.. dnbevfoces fockages... fockage I9).....foV0 Con...be. Gobegoni2ed MQ. bbe Ain. DUE boon RORMMME Od... Ue _chsigne.d Pockage.. I. Exercise: I. Write output of cod the given space rogram Code Output demo{ ae ‘ | public static void main(String args(}) { | char chars{] = {*2’,"b’,’c"}; | 7 | | String s = new String(chars); | abe | System.out-printin(s); y | fe | f class Output{ | | public static void main(String args[]) { | String s1 = “Hello I love Java” ; ring s2 = new String(s!); n.out.printIn((s | st-equals(s2)); 2. Write a program to implement all methods of StringBuffer class a State Board of Technical Education new int{10][20}; /a 2D int{][IL) intArray = new int{ 10]{20)( 10}; VIII, Resources required( Additional) Nil IX. Resources used (Additional) [Sr] Nameof [Bre ‘oad | Quantity | Remarks — | No. Resource Specification oo \ dfany) 1 5 | 5 bomRiter intel tone _ = ed a ae [ape one Program Code: Teacher must assign a separate prepare statement to group of 3- 4 students. le xf wi ee Pera, to. implement mulimensiona oe ».Glaee Spinal etehe ink’ - “Mous8 <0 j a i. ah Final Sholic int Gohmns='20; Pablio static void moinCahing C3 args) f Be Freduct 3 (32 New int Crow] folunn); ze 1 fem iree table”) 5 nus lo j i ie Sula tthe ig class. MyBaseClagg oe ny t Protected ld dap t System.out print pa ) eM class method), (S MYChiLdCtass extend ‘ IK MyBaseCass Public void disp) { 1 SPS Out rine Chid lag method”); Able static void main Suing args{)) ‘ Mychitac SPO: }} “dog? from “animal” to override ‘move( )' method ‘Space for answer) Ba. >....6lass. Animal. { 3 Onima lO); ; an rai weet Rae oh J. fog tends In rs Poet Program Code: Teachey i inn Note: Attach the cout Glass Student ¢ int Yoll.n Sting fame ; Yoid getdate ¢) ora atthe ls and "HVE ihre f af 60.0 (" Fate Toll.N = Go pe Mea manls g rat Nome = 8, teen, i} te Glass. ‘Regu A 4 void © Galculatec); , FB ep Class Test § “he vmC SAING.05 args), * Wesulte nay ey Y =Sehoda; ¥. Caleate C1)! NI Result (Output of Code): MIL. Practical Related Que’ jacation Maharashira State Board of Technical Edi iy te tine portance Baie te condoms "dead ili. 6. Usa ge.....of ee ea fest. close... inlonge ~Glher..0.... Can. slags. sem yoo PC Meanie 18 # sm m : Bot. lags = ~_ lads ’ “India iat ie Ponty (0. (“Gaundy...t8 veal xv. State... extend 8... TOBE. oconsssnnn Shing... gk = “Mabavosha.” 1 li disP. Glale().... } Soh ("Ghale. a 7 Glog Jeno { ih. 1 f-$.V.m Shag 1... ange) : bet State. () ; ce Bona j “fei es! re incertae ts 2, Maletrle yComs series gt idl ypc string thous ierface tem ia aislay sans, HemMetods etace em extend emeon t plementing ner 8 eres ae slike se asses whose features/properties are inherited, Tes sdtory to define class that inherits the given interface, dss anna implements itrfacenarne body of classname The class classname "implements" the interface interfacename. Glass classname extends superclass implements interface, interface? i body of classname VIN. Resoure ML. Resources required (Additional Nil ges Resources useq (Additional) [=] Somer — Nel Re Remarks If any) ns for repel us jevement Of | yonce. Teach ‘dentfied co. "ttt 5 more such 1 Ditferentate 2 Wie similarities bern 2 ne advantages of Hers 4 wa decompile ses tyr(Assume Suitable Class) public invert nousLine © oid ShowLine() yw Line”); { ‘System out printin( "Sho (Space for answer) ing 4 Package ares Age San Bag shorte roared a theo Lois: Aa Si packaxel [: Dackagep tage! is ne of the aul pside tte pac hi s //shorteut APProach 7 esources required’ Additional) vl Nil resources used (Additional) ~ Name of _ Resource mn {Program Code: Teacher must assign a separate frépummtaufenahite group of 3- 4 students, Write a program to implement user defined package and importing the same. Note: Attach the code at the end. + packages int tekms Of creating a new fublic Class Test§ S¥sh0.ou+ Rioh6 ("Sol = "eb); 0,b,Gd; pa xn Resale (Output of CO") Sal pase ractcal Related Questions Tastes heey ve questions for reference. Teacher must design on li ie 0 1 one tne achievement of identified CO. 1. Name some of java packages. Fee ort same claspackage twice? Will the JVM load the package twice gt 3. Wait filly qualified and shortcut class naming approach with examples, (Space for answer) Joo....owt.* ; joo, lang.# pet sions for reference. TeMcher MUst des ign xm Practical Related Questo" Nowe: Be sample questi! tiovement of identified CO. ensure the ae Pfs it possible 0 start a 2 Can we call the run() n use of keyword synchronized. (Space for answer) Googe thread Storted......0gaio, $0.,....0N:..:.. legal 98.0... AROS. 25.2 if Wakes hat: ohjact 0 jondom. by. he... im baits... me Gallin, ‘i by | Bi One. method. lial 4) procirreads while setting the 0 tren * ret tho code. ris x Thread elas") mou print ois public : “his is Thread2 class”); : intl System. out pi publi class ThresdP publie state void main(String argsf ]) ea) a0: «Priority( Thread. MIN_ PRIORITY): ctPriority(Thread MIN_ PRIORITY): U.tun(); runt );} Geate tree threads and run these threads according to set priority (Space for answer) fa Threod. | extends Tp ia fbi SS Tread ~Sa a a Maia Sp, Stok); iy Tread oa * Gay) poo Hs Shayt (PS Toad Se a ral Education 25(5.. jak d - 0. PA dobal i fateh Cou. brink — Det “9 $.0,Ple); " Finally... { fe Pl Fal Block.” 2; y80-P ed") 5 sf estions, cated Quey ton wat exception row nd gx, © Of final} inthe Us ‘od an ne ” Mandal, EXCePHion 4 when... ‘ a Seti . Ki Must Y biog fass anititeargument Butler wad bre oe ie te den oF Se SS i 540.0 (“Enley i Shing....Pls. by. iP. C fo8s... equate “ thy YoU. new. tication Kaw ot | ceo F Technical Education ning (23812) er Joa omg eaten eee cea al Gloss rr (shing ia id...09.@... ExePho Bruplion ‘suey. Cnsg] oe Ht Bev... Cshing. ang] lane. = false ad Ctdane.) SubPlloge: *'); rg Acention called “NotMatchException” that is th ‘ot equal to “India”. Write a pr ‘ogram that uses this exception White the ouput oF he following program class tst own when a string is n public stb voia main(String args{]) "thread sleep(10000); System out printin ‘Hello java"); 3. Write the output of the following program: class ist Public static voig main String() args)throws IntetruptedException Thread, sleep(10090); , S¥stem.out Printin(' Hello Java", PB Cage's 0.) i i : Public f : pul ie (ee ae e cous ‘readline 1 ag Gatch CBxapin Hi) at rier Se iC £6, equaleC “india || i AANMOl. NG... Match... excePlian j —_ ( NetMatchExcePtion. Nutt) PCN. Maith | Maharashtra State Board jewer tool fet output eat 2, By Java apricot, only ae oS Throw applewie' il-edged en the rain wer pera ran nae roan ec tins nl “apie ewer sve st Hello Java be set sand theref the apple appletloader started Fig.15, Output of HelloJava applet by using appletviewer VIII, Resources required(Additional) Nil IX. Resources used (Additi [Se] Name of] a (| Remarks” { [epee | wo a I Net es. =a _(ifany) Practic pe | x Note: ss a more | 1. Di = Ba Loeb a) 2.5 wees r must assign a separate program statement to group of 3- > Greate two applets by using different ways in java, fublic lay hes Name exdend oPPle Board of Technical Education at ple © 2 ee: a aetnad Appel svcorda Applet ad ae idesdy ti Chan j E 4 = onvel (92 j5005 52543), mt Et a | Resources require, nr TAdattongy) Bsrtoutises aed (Aaditian 1) ite a program to impleme = Attach the code at ane ny? P 0 dh basic aninatea shapes ect ova, otelek: en ants, e 3 geek. Glorrd 51 © catah (satenfled excpon) € C=30) a=3) (Output of Code): Pee og al pan on A Tor Technical Education soa Propamin xi, Practical R Nowe: Below mare such 1 Different 2 Explain methods rea et perween serforeground } 3. Different jared Questions oat sample green Lie referer xd co draw different st nd setC ce, Teacher must design given are reo m sos co az #0 nerd (04 eriunewemern of er Herrween executing Ihe a plet with mprerviewer and HTM Gle joes with different colors? rator( ) methods: 3 Dire reer spp ee en Mspace for answe” Ap.....A polet ig a. that duns. ian. id (ae byowser 0 Main) Rea cn inlet ae afPle: Glas. y : ie {ho ot. od tne AS ult efevence AS. 2 Used negating. pod MO Jove. to. Set. set the 2 ont AN = GomPle te. ound. 1) . cer «ail EX wee » Theoretical Back; in ot caer itt aplet draws graphical iy jt jqterent Shapes, Mage inside 4 * APProprite raphe eee roes required (Additionaly _— asi the « With proper svete *¥8tem. Tos required ou" Re Nil used (Additionaly enurees SECT Name of rogram Code: Teacher must assign a separa rremaent ign a separate program statement to group of 3 Aeonstrate the use of basic applet, which includes different shapes ik ojlinders ete ‘Attach the code at the end, Note:

You might also like