版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
英文Java面試題Question:What(yī)istransientvariable?Answer:Transientvariablecan'tbeserialize.ForexampleifavariableisdeclaredastransientinaSerializableclassandtheclassiswrittentoanObjectStream,thevalueofthevariablecan'tbewrittentothestreaminsteadwhentheclassisretrievedfromtheObjectStreamthevalueofthevariablebecomesnull.Question:NamethecontainerswhichusesBorderLayoutastheirdefaultlayout?Answer:ContainerswhichusesBorderLayoutastheirdefaultare:window,FrameandDialogclasses.Question:WhatdoyouunderstandbySynchronization?Answer:Synchronizationisaprocessofcontrollingtheaccessofsharedresourcesbythemultiplethreadsinsuchamannerthatonlyonethreadcanaccessoneresourceat(yī)atime.Innonsynchronizedmultithreadedapplication,itispossibleforonethreadtomodifyasharedobjectwhileanotherthreadisintheprocessofusingorupdatingtheobject'svalue.Synchronizationpreventssuchtypeofdatacorruption.E.g.Synchronizingafunction:publicsynchronizedvoidMethod1(){//Appropriat(yī)emethod-relatedcode.}E.g.Synchronizingablockofcodeinsideafunction:publicmyFunction(){synchronized(this){//Synchronizedcodehere.}}Question:WhatisCollectionAPI?Answer:TheCollectionAPIisasetofclassesandinterfacesthatsupportoperationoncollectionsofobjects.Theseclassesandinterfacesaremoreflexible,morepowerful,andmoreregularthanthevectors,arrays,andhashtablesifeffectivelyreplaces.Exampleofclasses:HashSet,HashMap,ArrayList,LinkedList,TreeSetandTreeMap.Exampleofinterfaces:Collection,Set,ListandMap.Question:IsIteratoraClassorInterface?Whatisitsuse?Answer:IteratorisaninterfacewhichisusedtostepthroughtheelementsofaCollection.Question:Whatissimilarities/differencebetweenanA(yù)bstractclassandInterface?Answer:Differencesareasfollows:Interfacesprovideaformofmultipleinheritance.Aclasscanextendonlyoneotherclass.Interfacesarelimitedtopublicmethodsandconstantswithnoimplementation.Abstractclassescanhaveapartialimplementation,protectedparts,staticmethods,etc.AClassmayimplementseveralinterfaces.Butincaseofabstractclass,aclassmayextendonlyoneabstractclass.Interfacesareslowasitrequiresextraindirectiontofindcorrespondingmethodintheactualclass.Abstractclassesarefast.Similarities:NeitherAbstractclassesorInterfacecanbeinstantiat(yī)ed.Question:HowtodefineanAbstractclass?Answer:AclasscontainingabstractmethodiscalledAbstractclass.AnAbstractclasscan'tbeinstantiated.ExampleofAbstractclass:abstractclasstestAbstractClass{protectedStringmyString;publicStringgetMyString(){returnmyString;}publicabstractstringanyAbstractFunction();}Question:HowtodefineanInterface?Answer:InJavaInterfacedefinesthemethodsbutdoesnotimplementthem.Interfacecanincludeconstants.AclassthatimplementstheinterfacesisboundtoimplementallthemethodsdefinedinInterface.EmapleofInterface:publicinterfacesampleInterface{publicvoidfunctionOne();publiclongCONSTANT_ONE=1000;}Question:ExplaintheuserdefinedExceptions?Answer:UserdefinedExceptionsaretheseparateExceptionclassesdefinedbytheuserforspecificpurposed.Anuserdefinedcancreatedbysimplysub-classingittotheExceptionclass.Thisallowscustomexceptionstobegenerated(usingthrow)andcaughtinthesamewayasnormalexceptions.Example:classmyCustomExceptionextendsException{//Theclasssimplyhastoexisttobeanexception}Question:ExplainthenewFeaturesofJDBC2.0CoreAPI?Answer:TheJDBC2.0APIincludesthecompleteJDBCAPI,whichincludesbothcoreandOptionalPackageAPI,andprovidesinductrial-strengthdatabasecomputingcapabilities.NewFeaturesinJDBC2.0CoreAPI:Scrollableresultsets-usingnewmethodsintheResultSetinterfaceallowsprogrammat(yī)icallymovethetoparticularrowortoapositionrelativetoitscurrentpositionJDBC2.0CoreAPIprovidestheBatchUpdatesfunctionalitytothejavaapplicat(yī)ions.JavaapplicationscannowusetheResultSet.updateXXXmethods.Newdatatypes-interfacesmappingtheSQL3datat(yī)ypesCustommappingofuser-definedtypes(UTDs)Miscellaneousfeatures,includingperformancehints,theuseofcharacterstreams,fullprecisionforjava.mat(yī)h.BigDecimalvalues,additionalsecurity,andsupportfortimezonesindate,time,andtimestampvalues.Question:Explaingarbagecollection?Answer:GarbagecollectionisoneofthemostimportantfeatureofJava.GarbagecollectionisalsocalledautomaticmemorymanagementasJVMautomaticallyremovestheunusedvariables/objects(valueisnull)fromthememory.Userprogramcann'tdirectlyfreetheobjectfrommemory,insteaditisthejobofthegarbagecollectortoautomat(yī)icallyfreetheobjectsthatarenolongerreferencedbyaprogram.Everyclassinheritsfinalize()methodfromjava.lang.Object,thefinalize()methodiscalledbygarbagecollectorwhenitdeterminesnomorereferencestotheobjectexists.InJava,itisgoodideatoexplicitlyassignnullintoavariablewhennomoreinuse.IJavaoncallingSystem.gc()andRuntime.gc(),JVMtriestorecycletheunusedobjects,butthereisnoguaranteewhenalltheobjectswillgarbagecollected.Question:Howyoucanforcethegarbagecollection?Answer:Garbagecollectionautomaticprocessandcan'tbeforced.Question:WhatisOOPS?Answer:OOPisthecommonabbreviationforObject-OrientedProgramming.Question:DescribetheprinciplesofOOPS.Answer:TherearethreemainprincipalsofoopswhicharecalledPolymorphism,InheritanceandEncapsulation.Question:ExplaintheEncapsulationprinciple.Answer:Encapsulationisaprocessofbindingorwrappingthedat(yī)aandthecodesthatoperatesonthedat(yī)aintoasingleentity.Thiskeepsthedatasafefromoutsideinterfaceandmisuse.Onewaytothinkaboutencapsulationisasaprotectivewrapperthatpreventscodeanddatafrombeingarbitrarilyaccessedbyothercodedefinedoutsidethewrapper.Question:ExplaintheInheritanceprinciple.Answer:Inheritanceistheprocessbywhichoneobjectacquiresthepropertiesofanotherobject.Question:ExplainthePolymorphismprinciple.Answer:ThemeaningofPolymorphismissomethinglikeonenamemanyforms.Polymorphismenablesoneentitytobeusedasasgeneralcategoryfordifferenttypesofactions.Thespecificactionisdeterminedbytheexactnatureofthesituation.Theconceptofpolymorphismcanbeexplainedas"oneinterface,multiplemethods".Question:ExplainthedifferentformsofPolymorphism.Answer:Fromapracticalprogrammingviewpoint,polymorphismexistsinthreedistinctformsinJava:MethodoverloadingMethodoverridingthroughinheritanceMethodoverridingthroughtheJavainterfaceQuestion:WhatareAccessSpecifiersavailableinJava?Answer:Accessspecifiersarekeywordsthat(yī)determinesthetypeofaccesstothememberofaclass.Theseare:PublicProtectedPrivateDefaultsQuestion:DescribethewrapperclassesinJava.Answer:Wrapperclassiswrapperaroundaprimitivedatatype.Aninstanceofawrapperclasscontains,orwraps,aprimitivevalueofthecorrespondingtype.Followingtableliststheprimitivetypesandthecorrespondingwrapperclasses:PrimitiveWrapperbooleanjava.lang.Booleanbytejava.lang.Bytecharjava.lang.Characterdoublejava.lang.Doublefloatjava.lang.Floatintjava.lang.Integerlongjava.lang.Longshortjava.lang.Shortvoidjava.lang.VoidQuestion:Readthefollowingprogram:publicclasstest{publicstaticvoidmain(String[]args){intx=3;inty=1;if(x=y)System.out.println("Notequal");elseSystem.out.println("Equal");}}Whatistheresult?A.Theoutputisequal?br>B.TheoutputinnotEqual?br>C.Anerrorat"if(x=y)"causescompilationtofall.D.Theprogramexecutesbutnooutputisshowonconsole.Answer:CQuestion:what(yī)istheclassvariables?Answer:Whenwecreateanumberofobjectsofthesameclass,theneachobjectwillshareacommoncopyofvariables.Thatmeansthatthereisonlyonecopyperclass,nomatterhowmanyobjectsarecreat(yī)edfromit.Classvariablesorstaticvariablesaredeclaredwiththestatickeywordinaclass,butminditthatitshouldbedeclaredoutsideoutsideaclass.Thesevariablesarestoredinstaticmemory.Classvariablesaremostlyusedforconstants,variablethatneverchangeitsinitialvalue.Staticvariablesarealwayscalledbytheclassname.Thisvariableiscreat(yī)edwhentheprogramstartsi.e.itiscreatedbeforetheinstanceiscreatedofclassbyusingnewoperatorandgetsdestroyedwhentheprogramsstops.Thescopeoftheclassvariableissameainstancevariable.Theclassvariablecanbedefinedanywhereatclasslevelwiththekeywordstatic.Itinitialvalueissameasinstancevariable.Whentheclassvariableisdefinedasintthenit'sinitialvalueisbydefaultzero,whendeclaredbooleanitsdefaultvalueisfalseandnullforobjectreferences.Classvariablesareassociatedwiththeclass,rat(yī)herthanwithanyobject.Question:Whatisthedifferencebetweentheinstanceofandgetclass,thesetwoaresameornot?Answer:instanceofisaoperator,notafunctionwhilegetClassisamethodofjava.lang.Objectclass.Consideraconditionwhereweuseif(o.getClass().getName().equals("java.lang.Mat(yī)h")){}Thismethodonlychecksiftheclassnamewehavepassedisequaltojava.lang.Math.Theclassjava.lang.MathisloadedbythebootstrapClassLoader.Thisclassisanabstractclass.Thisclassloaderisresponsibleforloadingclasses.EveryClassobjectcontainsareferencetotheClassLoaderthatdefines.getClass()methodreturnstheruntimeclassofanobject.Itfetchesthejavainstanceofthegivenfullyqualifiedtypename.Thecodewehavewrittenisnotnecessary,becauseweshouldnotcomparegetClass.getName().ThereasonbehinditisthatifthetwodifferentclassloadersloadthesameclassbutfortheJVM,itwillconsiderbothclassesasdifferentclassesso,wecan'tcomparetheirnames.Itcanonlygivestheimplementingclassbutcan'tcompareainterface,butinstanceofoperatorcan.Theinstanceofoperatorcomparesanobjecttoaspecifiedtype.Wecanuseittotestifanobjectisaninstanceofaclass,aninstanceofasubclass,oraninstanceofaclassthatimplementsaparticularinterface.WeshouldtrytouseinstanceofoperatorinplaceofgetClass()method.RememberinstanceofopeatorandgetClassarenotsame.Trythisexample,itwillhelpyoutobetterunderstandthedifferencebetweenthetwo.Interfaceone{}ClassTwoimplementsone{}ClassThreeimplementsone{}publicclassTest{publicstaticvoidmain(Stringargs[]){onetest1=newTwo();onetest2=newThree();System.out.println(test1instanceofone);//trueSystem.out.println(test2instanceofone);//trueSystem.out.println(Test.getClass().equals(test2.getClass()));//false}}*Q1.HowcouldJavaclassesdirectprogrammessagestothesystemconsole,buterrormessages,saytoafile?.TheclassSystemhasavariableoutthatrepresentsthestandardoutput,andthevariableerrthatrepresentsthestandarderrordevice.Bydefault,theybothpointatthesystemconsole.Thishowthestandardoutputcouldbere-directed:Streamst=newStream(newFileOutputStream("output.txt"));System.setErr(st);System.setOut(st);*Q2.What'sthedifferencebetweenaninterfaceandanabstractclass?A.Anabstractclassmaycontaincodeinmethodbodies,whichisnotallowedinaninterface.Withabstractclasses,youhavetoinherityourclassfromitandJavadoesnotallowmultipleinheritance.Ontheotherhand,youcanimplementmultipleinterfacesinyourclass.*Q3.Whywouldyouuseasynchronizedblockvs.synchronizedmethod?A.Synchronizedblocksplacelocksforshorterperiodsthansynchronizedmethods.*Q4.Explaintheusageofthekeywordtransient?A.Thiskeywordindicat(yī)esthatthevalueofthismembervariabledoesnothavetobeserializedwiththeobject.Whentheclasswillbede-serialized,thisvariablewillbeinitializedwithadefaultvalueofitsdatat(yī)ype(i.e.zeroforintegers).*Q5.Howcanyouforcegarbagecollection?A.Youcan'tforceGC,butcouldrequestitbycallingSystem.gc().JVMdoesnotguaranteethat(yī)GCwillbestartedimmediat(yī)ely.*Q6.Howdoyouknowifanexplicitobjectcastingisneeded?A.Ifyouassignasuperclassobjecttoavariableofasubclass'sdatatype,youneedtodoexplicitcasting.Forexample:Objecta;Customerb;b=(Customer)a;Whenyouassignasubclasstoavariablehavingasupeclasstype,thecastingisperformedautomatically.*Q7.What'sthedifferencebetweenthemethodssleep()andwait()A.Thecodesleep(1000);putsthreadasideforexactlyonesecond.Thecodewait(1000),causesawaitofuptoonesecond.Athreadcouldstopwaitingearlierifitreceivesthenotify()ornotifyAll()call.Themethodwait()isdefinedintheclassObjectandthemethodsleep()isdefinedintheclassThread.*Q8.CanyouwriteaJavaclassthatcouldbeusedbothasanappletaswellasanapplication?A.Yes.Addamain()methodtotheapplet.*Q9.What(yī)'sthedifferencebetweenconstructorsandothermethods?A.Constructorsmusthavethesamenameastheclassandcannotreturnavalue.Theyareonlycalledoncewhileregularmethodscouldbecalledmanytimes.*Q10.CanyoucalloneconstructorfromanotherifaclasshasmultipleconstructorsA.Yes.Usethis()syntax.*Q11.ExplaintheusageofJavapackages.A.Thisisawaytoorganizefileswhenaprojectconsistsofmultiplemodules.Italsohelpsresolvenamingconflictswhendifferentpackageshaveclasseswiththesamenames.Packagesaccesslevelalsoallowsyoutoprotectdatafrombeingusedbythenon-authorizedclasses.*Q12.Ifaclassislocatedinapackage,what(yī)doyouneedtochangeintheOSenvironmenttobeabletouseit?A.YouneedtoaddadirectoryorajarfilethatcontainsthepackagedirectoriestotheCLASSPATHenvironmentvariable.Let'ssayaclassEmployeebelongstoapackagecom.xyz.hr;andislocatedinthefilec:\dev\com\xyz\hr\Employee.java.Inthiscase,you'dneedtoaddc:\devtothevariableCLASSPATH.Ifthisclasscontainsthemethodmain(),youcouldtestitfromacommandpromptwindowasfollows:c:\>javacom.xyz.hr.Employee*Q13.What'sthedifferencebetweenJ2SDK1.5andJ2SDK5.0?A.There'snodifference,SunMicrosystemsjustre-brandedthisversion.*Q14.WhatwouldyouusetocomparetwoStringvariables-theoperator==orthemethodequals()?A.I'dusethemethodequals()tocomparethevaluesoftheStringsandthe==tocheckiftwovariablespointatthesameinstanceofaStringobject.*Q15.Doesitmatterinwhat(yī)ordercatchstatementsforFileNotFoundExceptionandIOExceptiponarewritten?A.Yes,itdoes.TheFileNoFoundExceptionisinheritedfromtheIOException.Exception'ssubclasseshavetobecaughtfirst.*Q16.Cananinnerclassdeclaredinsideofamethodaccesslocalvariablesofthismethod?A.It'spossibleifthesevariablesarefinal.*Q17.Whatcangowrongifyoureplace&&with&inthefollowingcode:Stringa=null;if(a!=null&&a.length()>10){...}A.AsingleampersandherewouldleadtoaNullPointerException.*Q18.What'sthemaindifferencebetweenaVectorandanArrayListA.JavaVectorclassisinternallysynchronizedandArrayListisnot.*Q19.WhenshouldthemethodinvokeLater()beused?A.ThismethodisusedtoensurethatSwingcomponentsareupdatedthroughtheevent-dispat(yī)chingthread.*Q20.Howcanasubclasscallamethodoraconstructordefinedinasuperclass?A.Usethefollowingsyntax:super.myMethod();Tocallaconstructorofthesuperclass,justwritesuper();inthefirstlineofthesubclass'sconstructor.Forsenior-leveldevelopers:**Q21.What'sthedifferencebetweenaqueueandastack?A.Stacksworksbylast-in-first-outrule(LIFO),whilequeuesusetheFIFOrule**Q22.Youcancreateanabstractclassthatcontainsonlyabstractmethods.Ontheotherhand,youcancreateaninterfacethat(yī)declaresthesamemethods.Socanyouuseabstractclassesinsteadofinterfaces?A.Sometimes.Butyourclassmaybeadescendentofanotherclassandinthiscasetheinterfaceisyouronlyoption.**Q23.WhatcomestomindwhenyouhearaboutayounggenerationinJava?A.Garbagecollection.**Q24.WhatcomestomindwhensomeonementionsashallowcopyinJava?A.Objectcloning.**Q25.Ifyou'reoverridingthemethodequals()ofanobject,whichothermethodyoumightalsoconsider?A.hashCode()**Q26.Youareplanningtodoanindexedsearchinalistofobjects.WhichofthetwoJavacollectionsshouldyouuse:ArrayListorLinkedList?A.ArrayList**Q27.HowwouldyoumakeacopyofanentireJavaobjectwithitsstat(yī)e?A.HavethisclassimplementCloneableinterfaceandcallitsmethodclone().**Q28.Howcanyouminimizetheneedofgarbagecollectionandmakethememoryusemoreeffective?A.Useobjectpoolingandweakobjectreferences.**Q29.Therearetwoclasses:AandB.TheclassBneedtoinformaclassAwhensomeimportanteventhashappened.WhatJavatechniquewouldyouusetoimplementit?A.IftheseclassesarethreadsI'dconsidernotify()ornotifyAll().ForregularclassesyoucanusetheObserverinterface.**Q30.Whataccessleveldoyouneedtospecifyintheclassdeclarationtoensurethatonlyclassesfromthesamedirectorycanaccessit?A.Youdonotneedtospecifyanyaccesslevel,andJavawilluseadefaultpackageaccesslevel.TheJ2EEquestionsarecomingsoon.StaytunedforYakovFainonLiveSYS-CON.TV.AskyourquestionstoYakovontheair!=====================IBMjava英文面試題1.what(yī)isoracle.2.whatismajordiffereneceoracle8iandoracle9i.4.tellmesomethingurself.5.pleasetellmeaboutoops.6.whatissingleinheritance.7.whatismultipleinheritance.8.canjavasupportmultipleinheritance.9.what(yī)isinterface.10.what(yī)isdifferenecbetweenabstractclassandinterface.11.howtouprovethatabstraceclasscannotinstantiatedirectly.12.whatisdifferenecebetweenstringandstringbuffer.13.whatisimmutable14.howtowriteaprogramusingsortprogram.15howtowriteaprogramusingunsortprogram.16.whatislegacy.17.whatislegacyapi18.whatislegacyinterface.19.whatismaindifferencehashmapandhastable20.whatismaindifferencebetweenarraylistandvector.21.whatisstrutsframework.22.whataredistributedtechonologies.23.whatisadvantageanddisadvantageofdistributedtechonologies.24.whatismaindifferencebetweenjspandservlets.25.whatisdifferencebetweenprocedureandfunctions.26.whatisjdbc.27.whataretypeofdrivers.28.whatistype4driver.29.howtocollectrequuirementsformurclient.30.whichprocessuseinurproject.31.what(yī)isdeploymentdescriptor.32.whatisheirarchyoffilesinstruts.33.pleasedrawstrutsframewrok.34.pleasedrawj2eearchitecture.35.pleasedrawmvc-2architecture.36.pleasedrawthathowdesignopmodule.37.howtofindafileonlinux.38.howtoconfigureweblogic8.1onlinux.39.whyyouusestrutsframeworkinurproject.40.whatisplatfromindependent41.whatisawtandswing.42.whatisheavywieghtcomponents.43.whatisfeatureofweblgoic8.1.44.whyyouchooseapplicationserveronlinuxanddatabaseserveronaix.45.pleasetellmeabouturproject.46.whatismajorconceptsinoops.47.whyuchoosemvc-2architecture.48.whatisimplicitobject.49.howmanyimplicitobjectsinjsp50.whychooseweblogic8.1otherthananyapplicationserver.51.whatiswaterfallmodelvssdlc52.whatisuseofdataflowdiagrams53.whatisipinurproject.54.whataboutreceptionmodule—————————————————————————————————————————————————————————1.OracleisanRDBMSproductwithDDLandDMLfromacompanycalledOracleInc.2.Differencebetween8iand9iisgivenintheOraclesite3.Questionnotavailable4.Something5.oopsisObjectOrientedProgramming6.what(yī)issingleinheritance.ans:oneclassisinheritedbyonlyotheroneclass7.whatismultipleinheritance.ans:Oneclassinheritingmorethanoneclassatat(yī)ime8.canjavasupportmultipleinheritance.ans:No9.whatisinterface.ans:Interfacehasonlymethoddeclarationsbutnodefn10.whatisdifferenecbetweenabstractclassandinterface.ans:Inabstractclasssomemethodsmaycontaindefinition,butininterfaceeverymethodshouldbeabstract11.howtouprovethatabstraceclasscannotinstantiatedirectly.a(chǎn)ns:Astheydonthaveconstructortheycantbeinstantiated12.whatisdifferenecebetweenstringandstringbuffer.ans:Stringsareimmutablewhereasstringbuffercanbemodified13.whatisimmutableans:Whichcantbechanged14.howtowriteaprogramusingsortprogram.15howtowriteaprogramusingunsortprogram.a(chǎn)ns:BothcanbedoneusingjavascriptThisisforSortfunctionSelectTextSort(obj){//sortbytextvarN=obj.options.length;for(vari=0;i<N-1;i++){for(varj=i+1;j<N;j++){if(obj.options[i].text>obj.options[j].text){vari1=(obj.options[i].selected==true)?true:falsevarj1=(obj.options[j].selected==true)?true:falsevarq1=obj.options[j].text;varq2=obj.options[j].value;obj.options[j].text=obj.options[i].text;obj.options[j].value=obj.options[i].value;obj.options[i].text=q1;obj.options[i].value=q2;obj.options[i].selected=(j1&&true)?true:falseobj.options[j].selected=(i1&&true)?true:false}}}returntrue}16.whatislegacy.17.whatislegacyapi18.whatislegacyinterface.a(chǎn)ns:legacyissomethingthatisoldintermsoftechnology/system19.whatismaindifferencehashmapandhastableans:Hashtableissynchronised20.whatismaindifferencebetweenarraylistandvector.ans:Vectorissynchronised21.whatisstrutsframework.22.whataredistributedtechonologies.distributedtechnologiesmeansanytechnology/s/wprogramthatarehavingmanycomponentsinmultipleenvironmentsthatinteractwitheachotherdependingonthefunctionalrequirementsanddesign.23.whatisadvantageanddisadvantageofdistributedtechonologies.overdependanceonsingleplatform/singlelanguageisavoided.Applicationcanbebuiltflexibletomeetrequirements.Divisionoflabourispossible.Bestofallthetechnologiesandplatformscanbeoptimallyutilized.Complexityofrequirementscanbereduced.25.whatisdifferencebetweenprocedureandfunctions.'ans:Fuctionscanreturnvalue,procedurescantreturnvalue26.whatisjdbc.ans:ConnectingtoDBfromjavaprogramrequiresJDBC27.whataretypeofdrivers.type1,2,3,429.howtocollectrequuirementsformurclient.isnotajobofatechnicalperson.ItisbetterforaBAtodoit.30.whichprocessuseinurproject.Generallyucansay:Projectrelatedprocess:Analysis,Design,Sign-offDocuments,Implementation,Integration,Testing,UATWorkrelatedprocess:TechnicalDesign,WorkAllocation,CodeReviewChecklist,UnitTestFormwillbepreparedbytheProjectLeadandgiventothedeveloper.DeveloperpreparestheUnitTestCaseImplementsCode,PerformsTestSubmitsCodethroughCVS/VSSSubmitsdocumentsalongwithReleaseChecklisttothetester/leader.31.whatisdeploymentdescriptor.ans:Whichcontainstheinfrnmat(yī)ionlikewhichfiletobeused40.whatisplat(yī)fromindependentans:Alanguageissaidtobeplatformindependentifitcanberunonanymachinewithoutmodifyingcode41.whatisawtandswing.ans:AWTareheavyweightcomponentsandswingsarelightweightcomponents46.whatismajorconceptsinoops.ans:Abstraction,polymorphism,encapsulation,inheritance47.whyuchoosemvc-2architecture.ans:InMVC-2controllerisservletratherthanJSPwhichmakesitefficient48.whatisimplicitobject.ans:ImplicitobjectsareasetofJavaobjectsthattheJSPContainermakesavailabletodevelopersineachpage49.howmanyimplicitobjectsinjspans:out,page,session,request,response,applicat(yī)ion,pagecontext,config1.WhatisthedifferencebetweenanAppletandanApplication?AJavaapplicationismadeupofamain()methoddeclaredaspublicstaticvoidthatacceptsastringarrayargument,alongwithanyotherclassesthatmain()calls.ItlivesintheenvironmentthatthehostOSprovides.
AJavaappletismadeupofatleastonepublicclassthathastobesubclassedfromjava.awt.Applet.Theappletisconfinedtolivingintheuser'sWebbrowser,andthebrowser'ssecurityrules,(orSun'sappletviewer,whichhasfewerrestrictions).?Thedifferencesbetweenanappletandanapplicationareasfollows:1.AppletscanbeembeddedinHTMLpagesanddownloadedovertheInternetwhereasApplicationshavenospecialsupportinHTMLforembeddingordownloading.2.Appletscanonlybeexecutedinsideajavacompatiblecontainer,suchasabrowserorappletviewerwhereasApplicationsareexecutedatcommandlinebyjava.exeorjview.exe.3.Appletsexecuteunderstrictsecuritylimitationsthat(yī)disallowcertainoperations(sandboxmodelsecurity)whereasApplicat(yī)ionshavenoinherentsecurityrestrictions.4.Appletsdon'thavethemain()methodasinapplications.Insteadtheyoperateonanentirelydifferentmechanismwheretheyareinitializedbyinit(),startedbystart(),stoppedbystop()ordestroyedbydestroy().2.What(yī)arejavabeans?
JavaBeansisaportable,platform-independentcomponentmodelwrittenintheJavaprogramminglanguage,developedincollaborationwithindustryleaders.Itenablesdeveloperstowritereusablecomponentsonceandrunthemanywhere--benefitingfromtheplatform-independentpowerofJavat(yī)echnology.JavaBeansactsasaBridgebetweenproprietarycomponentmodelsandprovidesaseamlessandpowerfulmeansfordeveloperstobuildcomponentsthat(yī)runinActiveXcontainerapplicat(yī)ions.?Javabeansisverypowerfultoolyoucanuseinyourservlet/JSPbridge.YoucanusetheservletstobuildthebeanandcanbepassedovertotheJSPforreading.ThisprovidestightencapsulationofthedatawhilepreservingthesanctityofservletsandJSP.3.WhatisRMI?
RMIstandsforRemoteMethodInvocat(yī)ion.Traditionalapproachestoexecutingcodeonothermachinesacrossanetworkhavebeenconfusingaswellastediousanderror-pronetoimplement.Thenicestwaytothinkaboutthisproblemisthatsomeobjecthappenstoliveonanothermachine,andthatyoucansendamessagetotheremoteobjectandgetaresultasiftheobjectlivedonyourlocalmachine.
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 二零二五年婚生女共同財產(chǎn)協(xié)議離婚合同3篇
- 2024影視作品改編與合作合同
- 2024年物業(yè)服務(wù)招標(biāo)文件編制指南3篇
- 2024沙石工程安全生產(chǎn)管理與應(yīng)急預(yù)案合同2篇
- 2024正規(guī)汽車銷售合同范本
- 二零二五年度交通設(shè)施監(jiān)理居間合同3篇
- 2024年鐵路罐車項目深度研究分析報告
- 內(nèi)架支撐施工方案
- 2024汽車融資租賃合同法實施指南3篇
- 2018-2024年中國網(wǎng)絡(luò)貸款(融資)市場發(fā)展現(xiàn)狀調(diào)研及投資趨勢前景分析報告
- 2023-2024學(xué)年北京市通州區(qū)九年級(上)期末語文試卷
- 2023-2024學(xué)年廣東省深圳市龍崗區(qū)八年級(上)期末英語試卷
- DB23-T 3768-2024北方種鵝節(jié)水生態(tài)旱養(yǎng)管理技術(shù)規(guī)程
- 事業(yè)單位招聘《綜合基礎(chǔ)知識》考試試題及答案
- 2024年電工(高級技師)考前必刷必練題庫500題(含真題、必會題)
- 墊江縣中醫(yī)院2018年11月份臨床技能中心教學(xué)設(shè)備招標(biāo)項目招標(biāo)文件
- 2024年《浙江省政治學(xué)考必背內(nèi)容》(修訂版)
- 2024-2025學(xué)年初中數(shù)學(xué)七年級下冊滬教版(五四學(xué)制)(2024)教學(xué)設(shè)計合集
- 房地產(chǎn)銷售主管崗位招聘筆試題及解答(某大型國企)2025年
- 廣東省惠州市(2024年-2025年小學(xué)四年級語文)統(tǒng)編版綜合練習(xí)(上學(xué)期)試卷及答案
- 廣東省廣州市天河區(qū)2024年六上數(shù)學(xué)期末聯(lián)考試題含解析
評論
0/150
提交評論