Professional Documents
Culture Documents
Javainterviewquestionsandanswerspart6
Javainterviewquestionsandanswerspart6
Search
Interview Currentaffairs Civilservices Banking Engineering MBA GD Placementpapers HR CV Coverletter Aptitude English Onlinetest
Askquestion!
JavaPDF
CoreJava
JavaInterviewQuestions
Interviewquestions
Javainterviewquestionsandanswerspart6
Javainterviewquestions
JavaFAQs
Java1Java2Java3Java4Java5Java6Java7Java8Java9Java10Java11Java12Java
13Java14Java15Java16Java17Java18Java19Java20Java21Java22
DownloadJava/OracleFAQ
Whatisthepurposeofthewait(),notify(),andnotifyAll()methods?
TestJDBCskills New
Latestanswer:Thewait()methodmakesthethreadtohalt,thusallowingotherthreadtoperform..................
Readansw er
TestJavaskills New
TestEJBskills New
Javaobject,class,method
Whatistherelationshipbetweenaneventlistenerinterfaceandaneventadapterclass?
Latestanswer:Aneventlistenerinterfaceallowsdescribingthemethodswhichmustbeimplementedbyoneof
theeventhandlerforaspecificevent..................
Readansw er
Javaoperator
Javavariables
Javaoverloadingoverriding
Javaabstractclasses
WhatisthepurposeoftheenableEvents()method?
Latestanswer:Aneventlistenerinterfaceallowsdescribingthemethodswhichmustbeimplementedbyoneof
theeventhandlerforaspecificevent..................
Readansw er
Javadatatypes
Javaarrays
Javaexception
Javaevents
WhatisthedifferencebetweentheFileandRandomAccessFileclasses?
Latestanswer:TheOSbasedfilesystemservicessuchascreatingfolders,files,verifyingthepermissions,
changingfilenamesetc.,areprovidedbythejava.io.Fileclass..................
Readansw er
Javavirtualmachine
Javainputandoutput
JavaURLconnections
Javasockets
Whataresynchronizedmethodsandsynchronizedstatements?
Latestanswer:Synchronizedmethodsareutilizedtocontroltheaccesstoanobjectespeciallyinmultithreaded
programming..................
Readansw er
JNDI
Javaapplets
JavaAWT
JavadrawingAWTcomponents
ExplainJavaclassloaders?Explaindynamicclassloading?
Latestanswer:TheclassesareavailabletotheJVMandarereferencedbythename.AfterJVMstarts,it
introducestheclassesintoit..................
Readansw er
Corejava
JDBC
JSP
EJB
Differencebetweenanabstractclassandaninterfaceandwhenshouldyouusethem
Latestanswer:Anabstracthasoneormoreabstractmethodsapartfromconcretemethods.Alltheabstract
methodsmustbeoverriddenbyitssubclasses..................
Readansw er
J2EE
JNI
Servlets
Struts
WhatisthemaindifferencebetweenanArrayListandaVector?Whatisthemaindifferencebetween
HashmapandHashtable?
Javathreading
Latestanswer:DifferencesbetweenArrayListandVector:.................
JMS
Readansw er
ExplaintheJavaCollectionframework?WhatarethebenefitsoftheJavacollectionframework?
Latestanswer:Acollectionisasetofheterogeneousobjects.Aframeworkmakestheapplicationsefficient,less
hardcoded,similarimplementationforvarious.................
Readansw er
http://www.careerride.com/javainterviewpage6.aspx
J2ME
Javawebservices
RMI
Internationalization
JavaScript
EJBArchitecture
1/5
2/23/2015
Javainterviewquestionsandanswerspart6
Whatisthemaindifferencebetweenshallowcloninganddeepcloningofobjects?
Spring
Latestanswer:Shallowcloningjustallowscloningtheobjectbutnottheirinternalparts..................
JavaTransactionAPIJTA
Readansw er
JBOSS
Whatisthedifferencebetweenfinal,finallyandfinalize()inJava?
Javatransactionservices,JTS
JavaGUIFrameworkinterview
Latestanswer:finalakeyword/accessmodifiertodefineconstants..................
Readansw er
SWT/JFaceinterview
MVCandJface
Whatistypecasting?Explainupcastingvsdowncasting?WhendoyougetClassCastException?
Latestanswer:Theconversionofagivenexpressionfromonetypetoanothertypeisreferredastype
casting..................
Readansw er
JavaServerFaces
Hibernateinterview
JAAS
JavaMailinterview
Whataredifferenttypesofinnerclasses?
Latestanswer:Thereare4typesofinnerclassesMemberinnerclass,Localinnerclass,Staticinnerclass
andAnonymousinnerclass.................
Readansw er
Tomcat
MIDPinterview
Weblogicinterview
Antinterview
WhatarepackagesinJava?
Websphereinterview
Latestanswer:Asthesizeofaprojectgrowslarger,themanageabilityofthefilesinitbecomestedious.
Readansw er ..............
Rubyinterview
WhatareNativemethodsinJava?
AspectOrientedProgramming
Latestanswer:JavaapplicationscancallcodewritteninC,C++,orassembler.Thisissometimes
done.................
Readansw er
jQueryinterview
Javadesignpatterns
Javalocalization
WhatisReflectionAPIinJava?
Latestanswer:TheReflectionAPIallowsJavacodetoexamineclassesandobjectsatruntime...........
Readansw er
ExplainShallowanddeepcloning.
Latestanswer:Cloningofobjectscanbeveryusefulifyouusetheprototypepatternorifyouwanttostorean
internalcopy...............
Readansw er
Explaintheimpactofprivateconstructor.
Latestanswer:PrivateConstructorscan'tbeaccessfromanyderivedclassesneitherfromanother
class...............
Readansw er
WhatarestaticInitializers?
Latestanswer:Astaticinitializerblockresemblesamethodwithnoname,noarguments,andnoreturn
type..............
Readansw er
Whatisthepurposeofthewait(),notify(),andnotifyAll()methods?
Latestanswer:notify():Wakesupasinglethreadthatiswaitingonthisobject'smonitor................
Readansw er
Whatistheadvantageoftheeventdelegationmodelovertheearliereventinheritancemodel?
Latestanswer:Eventdelegationmodelallowsaseparationbetweenacomponent'sdesignanditsuseasit
enableseventhandlingtobehandledbyobjectsotherthantheonesthatgeneratetheevents.......................
Readansw er
WhatisthedifferencebetweentheBoolean&operatorandthe&&operator?
Latestanswer:A&B
Inthis,boththeoperandsAaswellasBareevaluatedandthen&isappliedtothem..................
Readansw er
Whatisatask'spriorityandhowisitusedinscheduling?
http://www.careerride.com/javainterviewpage6.aspx
2/5
2/23/2015
Javainterviewquestionsandanswerspart6
Latestanswer:Apriorityisanintegervalue...............
Readansw er
Whatisthedifferencebetweenpreemptiveschedulingandtimeslicing?
Latestanswer:Ifacertaintaskisrunningandtheschedulingmethodusedispreemptive,andthenifthereis
anothertaskthathasahigherprioritythantheexecutingtask..................
Readansw er
Whatissynchronizationandwhyisitimportant?Describesynchronizationinrespecttomultithreading.
Latestanswer:Threadscommunicatebysharingaccesstofieldsandtheobjects................
Readansw er
HowareObserverandObservableused?
Latestanswer:Theobservableclassrepresentsanobservableobject.
Theobjecttobeobservedcanberepresentedbysubclassingobservableclass.................
Readansw er
WhatisResultSetMetaData?
Latestanswer:ResultSetMetaDataisanobjectthatgetsinformationaboutthetypesandpropertiesofthe
columnsinaResultSetobject...............
Readansw er
ExplainCacheRowset,JDBCRowsetandWebRowset.
Latestanswer:JdbcRowSetisaconnectedtypeofrowsetasitmaintainsaconnectiontothedatasourceusing
aJDBCdriver.................
Readansw er .
Explainthedifferencebetweenstaticandnonstaticmemberofaclass.
Latestanswer:Astaticfieldbelongstoaclass.Theobjectsoftheclasscannothavethecopyofthesefields.
Thesefieldsarereferredbytheclassname.Ex:Employee.company.Withoutcreatinganinstanceofaclass,
thesefieldscanbeaccessed...................
ReadAnsw er
Describetheuseofinstanceofkeyword.
Latestanswer:instanceofkeywordisusedtocheckwhatisthetypeofobject.................
ReadAnsw er
Whatisthedisadvantageofgarbagecollector?
Latestanswer:Althoughgarbagecollectorrunsinitsownthread,stillithasimpactonperformance.Itadds
overheadssinceJVMhastokeepconstanttrackoftheobject................
ReadAnsw er
WhatisanApplet?
Latestanswer:Anappletisasmallserversideapplicationthatcanbeloadedandcontrolledonthebrowserby
theclientapplication...............
ReadAnsw er
Explainthelifecycleofanapplet.
Latestanswer:Belowaresequencesofmethodsthatdescribesthelifecycleofanapplet............
ReadAnsw er
Whatisthepurposeoffinalization?
Latestanswer:Finalizationisthefacilitytoinvokefinalized()method.Thepurposeoffinalizationistoperform
someactionbeforetheobjectsgetcleanedup..............
ReadAnsw er
WhatisthedifferencebetweentheFileandRandomAccessFileclasses?
Latestanswer:TheFileclassisusedtoperformtheoperationsonfilesanddirectoriesofthefilesystemofan
operatingsystem.ThisoperatingsystemistheplatformforthejavaapplicationthatusestheFileclass
objects..............
ReadAnsw er
Defineclassandobject.Explainthemwithanexampleusingjava.
http://www.careerride.com/javainterviewpage6.aspx
3/5
2/23/2015
Javainterviewquestionsandanswerspart6
Latestanswer:Class:Aclassisaprogramconstructwhichencapsulatesdataandoperationsondata.Inobject
orientedprogramming,theclasscanbeviewedasablueprintofanobject.....................
ReadAnsw er
Explainclassvs.instancewithexampleusingjava.
Latestanswer:Aclassisaprogramconstructwhichencapsulatesdataandoperationsondata.Itisablueprint
ofanobject..................
ReadAnsw er
Whatisamethod?Provideseveralsignaturesofthemethods.
Latestanswer:Ajavamethodisasetofstatementstoperformatask.Amethodisplacedinaclass.Signatures
ofmethods:Thenameofthemethod,returntypeandthenumberofparameterscomprisethemethod
signature...............
ReadAnsw er
Explainthedifferencebetweeninstancevariableandaclassvariable
Latestanswer:Aninstancevariableisavariablewhichhasonecopyperobject/instance.Thatmeansevery
objectwillhaveonecopyofit..............
ReadAnsw er
Explainhowtocreateinstanceofaclassbygivinganexample.
Latestanswer:Javasupports3waysofcreatinginstancesByusingnewoperatorEx:ProductprodMouse=
newProduct()..............
ReadAnsw er
Whatisanabstractclass?Explainitspurpose.
Latestanswer:AclasswithoneofmoreabstractmethodsiscalledanAbstractclass.Anabstractmethodisa
methodwithsignaturewithoutcodeinit...............
ReadAnsw er
DifferencebetweenanAbstractclassandInterface
Latestanswer:Anabstractclasscanhavebothabstractandconcretemethodswhereasaninterfacecanhave
onlymethodsignatures..................
ReadAnsw er
Whatissingletonclass?Whereisitused?
Latestanswer:Aclassisdefinedassingletonclass,ifandonlyifitcancreateonlyoneobject.Thisclassis
usefulwhenonlyoneobjectistobeusedintheapplication............
ReadAnsw er
Differencebetweenapublicandanonpublicclass.
Latestanswer:Aclasswithaccessspecifierpubliccanbeaccessedacrossthepackages.Apackageislikea
folderinGUIbasedoperatingsystems.Forexample,thepublicclassStringclassisapublicclasswhichcan
beaccessedacrossthepackages..................
ReadAnsw er
YourDreamJob
Couldbefew
WeeksAway!
AskusNow!
WriteyourcommentShareKnowledgeandExperience
http://www.careerride.com/javainterviewpage6.aspx
4/5
2/23/2015
Javainterviewquestionsandanswerspart6
Jobs in TCS
monsterindia.com
http://www.careerride.com/javainterviewpage6.aspx
5/5