Formatting page ...
JA AVA FOR R SCHOO OL P PRACTICE PAPER R2 (Session 2013-2014)) ---------------------------------------------------------------- Mak king Java Fun F To Learrn --------------------------------------------------------------- COM MPUTE ER APPL LICATIO ONS ((THEORY Y) (One and a a half hours) h (Fu ull Marks 50) (Candiddates are alllowed No additional a minutes m for reading r thiss paper.) -----------------------------------------------------------------------------------------------------------------------------------------Thhe paper is divided d into o two Sectioons. In Section A, A answer any a 1 questiion in Part I and any 1 question fr from Part II.. A Answer all questions q fro om Section B. B All workking, includding rough work, w shouldd be done on o the same sheet as thee rest of thee answer. T intendeed marks forr questions or parts of questions are The a given in brackets [ ]. ] -----------------------------------------------------------------------------------------------------------------------------------------S SECTION A PART I Answ wer any 1 qu uestion Queestion 1 (a) What dooes the folloowing statement mean?? Employyee emp = new n Employyee () [2] (b) What doo you meann by calling a function?? How many y types of itt are there? Explain briiefly. [3] (c) Explainn the use of the return keyword. [2] (d) What arre constructtors? Why are a they neeeded? [3] Queestion 2 (a) Write thhe differencce between a global andd an instancce variable?? [2] (b) Write a function chheck which takes two integers argu uments x annd y and retturn true if x>y otherwise o reeturn false. [2] (c) Distinguuish betweeen formal annd actual paarameters. [2] (d) Explainn function overloading with an exaample. [3] (e) What iss function prrototype? [1] PART II Answ wer any 1 qu uestion Queestion 3 (a) (b) Give 2 significant differences between coompareTo(( ) and equaals( ). g statementss: Write thhe output sttored in variiables for thhe following (i) Sting st = "SOURAV " G GANGULY Y". substrin ng(3, 10); (ii) boolean b = "MUMBA AI". equalsIgnoreCase(("Mumbai")); int n = "Hello". indexO Of('e'); (iii) (iv) String s = "MADHYA " A". charAt(00) + "Pradessh". charAt((0); [2] [4] This Paper coonsists of 2 printed p pagees. C Computer Ap pplications www.jjavaforschhool.com Turn over
|