2023年Java英文面試題經(jīng)典_第1頁
2023年Java英文面試題經(jīng)典_第2頁
2023年Java英文面試題經(jīng)典_第3頁
2023年Java英文面試題經(jīng)典_第4頁
2023年Java英文面試題經(jīng)典_第5頁
已閱讀5頁,還剩28頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(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)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論