Escolar Documentos
Profissional Documentos
Cultura Documentos
I)TheQuestionpapercontains20multiplechoicequestionswithfourchoicesandstudentwillhaveto pickthecorrectone(eachcarrying1mark). 1. Whichofthefollowingmethodsisusedtogettheerrormessagefortheexceptionthatwasthrown: 2. 3. 4. 5. 6. 7. 8. 9. a)Printmessage c)Throwmessage a)Checkedexceptions b)Extractmessage d)Getmessage b)Uncheckedexceptions d)Errors. b)Finally,try,catch d)Try,Finally,Catch b)Dividinganobyanother d)Alloftheabove b)Private d)Package b)Java.io d)Java.text b)Pointer d)This b)Witchstatement d)Noneoftheabove b)Interfaces D)classesandinterfaces b)ControlOrientedModel d)Noneoftheabove b)mnu d)mne
Exceptionsthatareexpectedtopossiblyoccursarecalled:
c)Runtimeexceptions a)Try,catch,finally c)Catch,try,finally a)Accessinganarray c)Openingafile a)Public c)Protected a)Java.lang c)java.math Whichofthefollowingisnotakeywordinjava: a)Volatile c)Super Abreakstatementcantbeusedinsidea: a)Forstatement c)Labeledblock APackageisacollectionof: a)Classes c)Editingtools a)ComponentObjectModel c)ComputerOrientedModel a)m c)men
Thecorrectsequenceoftry,catchandfinallyisusually:
Whichofthefollowingactivitieshasthepotentialtothrowacheckedexception?
Thefinalizemethodisdeclaredwiththeaccessspecified:
Whichofthefollowingpackagesisimportedbydefault?
10. COMstandsfor:
11. InVB,theprefixfornamingamenuitemis..
12. ThereservewordDIMinVBisa.
a)declaration c)storageallocation a)ActiveDataObject c)AccessDataObject a)Designtime c)Both(a)&(b) a)StandardEXE c)DHTMLapplications Abinaryoperator: a)Negation c)NOT a)SingleInheritance c)MultipleInheritance Theformcaptionappearsinthe: a)Statusbar c)Titlebar a)Keytype c)Keyenter a)Groupofsimilaritems c)Groupofcontrolsthathavesamename
b)size d)identifier b)ActiveXDataObject d)Alloftheabove b)Runtime d)Noneoftheabove b)Dataproject d)DatabaseApplications b)BitwiseComplement d)Noneoftheabove b)MultilevelInheritance d)HybridInheritance b)MenuBar d)Noneoftheabove b)keyup d)keypress b)Groupofsimilarcontrols d)Noneoftheabove
13. ADOstandsfor:
14. Wecancreateobjectat:
Databasetoolsareaddedautomaticallytothetoolboxwhenprojectisdevelopedunder:
17. WhichtypeofinheritanceaccomplishedinJavausinginterfaces?
19. Whichkeyeventoccurswhenakeyispressed?
20. Acontrolarrayis:
I)TheQuestionpapercontains20multiplechoicequestionswithfourchoicesandstudentwillhaveto pickthecorrectone(eachcarrying1mark). 1. Whatdoesthefollowinglineofcodedo?StudentS1=newStudent(10); a)Creatingobjectsof10rows b)Creatingobjectsof10rows c)CreatingtheobjectS1&initializeitwithvalue10 d)Thecodeisillegal 2. WhichofthefollowingmethodsbelongtoStringclass? a)Length() b)CompareTo() c)Substring() d)Allofabove 3. WhichofthefollowingisJAVAkeyword? a)External b)Internal c)Private d)Throwing 4. Whichofthefollowingislegalarraydeclaration: A)int*x; b)intx[5]; c)inta[]={1,2,3}; d)noneoftheabove 5. Whatwillbetheoutputoffollowingcode: inti=0; for(;i>0;i) {; } a)Cannotbecompiled b)Executeininfiniteloop c)Produceanerror d)noneoftheabove 6. Whichofthefollowingistrue: a)Allclassmustdefineaconstructor b)AConstructorcanbedeclareprivate c)Aconstructorcanhavenoreturnvalue d)alloftheabove 7. Ifwewouldliketopreventamethodbeingfurthersubclassedthenwehavetousethefollowing keyword: a)static b)final c)inheritance d)extends 8. Classmembersarebydefault: a)private b)protected c)public d)publicprotected 9. The&&and||operatorsare: a)comparetwonumericvalues b)combinetwonumericvalues c)comparetwoBooleanvalues d)combinetwoBooleanvalues 10. Overloadingfunctions: a)makeproblemsimpleforprogrammer b)aregroupoffunctionswithsamename c)maybefailed d)giveunexpectedresults 11. whichoffollowingiscorrect: a)import.java.lang; b)importjava; c)importjava.lang.*; d)noneoftheabove 12. Whichofthefollowingisthelegaldefinitionofmain: a)publicstaticintmain(Stringargs[]) b)publicstaticvoidmain(Stringargs[]) c)publicstaticvoidMain(Stringargs[]) d)publicstaticvoidmain(stringargs[]) 13. JVMstandsfor: a)javavaluemachine b)javavirtualmechanics c)javavirtualmachine d)none 14. Whenaclasshierarchyiscreatedinwhatordertheconstructorsinahierarchyarecalled: a)fromsubclasstosuperclass b)fromlowerclasstoupperclass c)fromsuperclasstosubclass d)noneoftheabove 15. Toinheritdefinitionofoneclassintoanotherisdonebyusingkeyword: a)Extends b)extend
16. Actionsassociatedwithobjectsarecalled:
17. ADOconnectsitselftoadatabasethrough:
18. Thecharactersticthatdatacanbemanipulatedonlythroughmemberfunctionsthatarepartoftheclassis called: a)Encapsulation c)DataDependency a)Overridden d)Abstracted a)start() c)stop() b)Inheritance d)Instantiation c)Inherited b)paint() d)init()
19. Methodsdeclaredfinalcannotbe:
20. InAppletswhichmethodworksasconstructors:
(II) Attemptanythreequestions.Eachquestioncarries10marks. 1. 2. 3. 4. 5 6. ExplainJAVAfeatures.Alsoexplainjavavirtualmachine. WhatisvisibilityControloraccessspecifies.Whatarethetypes&effectoftheseonfields. ExplainvariousdatatypesinJAVA. a)Whatisthemeaningofpublic,staticvoidinstatementpublicstaticvoidmain(Stringargs[]). b)Howcanwecreateaobjectofanyclassinjava? Whatisconstructor?Whatarethespecialpropertiesoftheconstructor..Whendowedeclareamethodor classFinal. WriteaprograminJavalanguagetofindoutthefactorialofnaturalnumber5.Whatisfunction overloading?