Sie sind auf Seite 1von 2

1.Tellmeaboutyourself?

Ans:Giveyourbriefintroduction.
2.Explainaboutyourcurrentproject?
Ans:Itsquiteeasytodescribeyourprojectsandyourkeyroleonthisproject.But,becarefulandgetreadyabout
thefunctionalitywhenyouaredescribingyourworkingmodule/partoftheproject.Showyourconfidencethatyou
havedonethemajorpartandyoucanfacechallengesinfuture.
3.HowmanytypesofliteralsarethereinJAVA?
Ans:Theliteralsmeansthevalueyouareassigningtovariable.Youcanspecifythebelowtypesofliteralin
java.Aspertheprimitivedatatypes(int,short,long,float,double,boolean,char,etcthereisrespectiveliteral.Some
literalneedstobeendedwithaspecificcharacter.ReadMore.
longvar=20L//specifyLorlforlongliteral
intvar=20//Ifnotmentionedanycharacterthenitscanbeshortorint
charvar=A
floatvar=10.44f//specifyforFforfloatliteral
doublevar=10.44
booleanvar=true//orfalse

4.WhatismeantbyGarbagecollection?
Ans:Garbagecollectionisaautomaticfeatureofjavaforcleaningtheunusedobjectfromheap.Ithelpsto
developerforreleasingthereservedmemorywithoutanyextraeffortbydeveloper.Ithelpsdevelopertosavetime
andextramentaltensionforhandlingobjectallocationinmemory.Whenthereisnoreferencetoanobjectfound,it
willcleanthatobjectfrommemory.YoucanrunthegarbagecollectionexplicitlybyusingSystem.gc().
5.Diffferencebetweenstrings=newstring()andstrings="HiDude"?
Ans:Bothstatementsaredifferenttoeachother.Alwaysnewkeywordisusedtocreateobject.
Strings=newString()//Thisstatementcreatesnewobjectinheap.Sistheobjecthere.
Strings=HiDude//Thisstatementdonotcreateobject,itscreatingreferenceanditsstoringinStringConstant
Pool.Sisthereferencehere.
6.Whatissingletonclass?whereisitused?
Ans:ViewAnswer
7.WhatisthedifferencebetweenJSPandServlets?
Ans:AssimpleJSPisprecompiledbutServletsarenot.JSPisspeciallyusefordisplaying/populatingthedataon
browser.IfwetakeanexampleofMVCarchitectureJSPplaystheroleofView(V).But,Servletsareusedtohandle
therequestandprocessthebusinesslogic.InMVCarchitectureServletsareknowsasController(C).
8.Whatisthedifferenceinusingrequest.getRequestDispatcher()andcontext.getRequestDispatcher()?
Ans:BotharetakingStringparameter,butrequest.getRequestDispatcher()willdispatchtherequestinsidethe
application.Whereascontext.getRequestDispatcher()willdispatchtherequestoutsidethecontextalso.Ifyouare
usingabsolutepathfordispatchingthenbotharesimilar.
9.HowtheJSPfilewillbeexecutedontheServerside?
Ans:Firstitsconvertedtojavafile.Thenitscompiledbyjavacompilerandcreatesthe.classfile.Nowonceyou
getthe.classfileyoucanexecuteit.InternallyaJSPconvertsintorespectiveservlet.

Conversion=>Compilation=>Execution
10.WhatisActionServlet?
Ans:ActionServletprovidesthecontrollerinstrutsapplicationwithMVC(ModelViewController)Model2.
ActionServletisasubclassofjavax.servlet.http.HttpServlet.Ithasfewmethodslike
doGet(),doPost(),destroy(),etc.

11.WhatisStrutsValidatorFramework?
Ans:Strutsprovidesaconvenientwaytovalidate.Basicallyweareusingtwoxmlconfigurationfileforconfiguring
suchasValidator.xmlandvalidationrule.xml.validationrule.xmldefinestheruleofvalidationlikenumberformat
validation,emailvalidation.ApartfromthisActionFormhavingvalidate()methodwhichwecanimplementfor
validatingtheformdata.
12.WhatisthedifferencebetweentheSessionandSessionFactoryinhibernate?
Ans:SessionandSessionFactoryareplayingaprominentroleinhibernate.SessionFactoryisusedtocreate
Sessionanditscreatedonceduringstartingoftheapplication.YoucanhaveonlyoneSessionFactoryper
application.SessionFactoryisalsocalled2ndlevelcache.But,Sessioncouldbemanyperapplication.Sessionis
beingcreatedbyusingSessionFactoryobject.Sessioniscalled1stlevelcache.
13.WhatisHQL?
Ans:HQLstandsforHibernateQueryLanguage.ItsfullyobjectorientedandquitesimilarwithSQL.Itsupports
associationandjoinsforeffectiveentityrelationship.

Das könnte Ihnen auch gefallen