Anda di halaman 1dari 2

Q1.Whydoyouwanttoworkinthisindustry/company?

Ans:Firstyoushouldtrytoconvincethatthiscompanygiveshugeopportunityinmanyaspecti.e.newtechnologies
implementation,thepolicyofcompanysuitsyoulikeprofessionalism.Alsoyoucanmentionthatyouarebigfanof
thiscompanyanditsyourdreamcompany.Basicallyshowyourallpositiveattitudetowardscompany.
Q2.Whichlocationdoyouwanttoworkinandwhy?
Ans:Giveyourownchoice.Alsomentionavalidreasonforwhyyouareinterestedforthatlocation.Thereason
shouldbealwayspositiveandclear.Example:youcansupportyourfamilyfromthislocation,
Q3.Describeaproblemyoufacedandhowyoudealwithit?
Ans:Youcandescribeanyissueyoufacedduringyourprojectworkintheorganization.Andwhatthesolutionyou
haveimplementedforthatissue.
Q4.WhatarethetypesofclassloadersinJava?
Ans:Aspermyknowledgetherearebasically3typesofclassloaderlikebootstarpclassloader,extensionclass
loaderandsystemclassloader.
BootstrapClassLoader
Bootstrapclassloaderloadsjavascoreclasseslikejava.lang,java.utiletc.Theseareclassesthatare
partofjavaruntimeenvironment.Bootstrapclassloaderisnativeimplementationandsotheymaydiffer
acrossdifferentJVMs.
ExtensionsClassLoader
JAVA_HOME/jre/lib/extcontainsjarpackagesthatareextensionsofstandardcorejavaclasses.
Extensionsclassloaderloadsclassesfromthisextfolder.Usingthesystemenvironmentpropery
java.ext.dirsyoucanaddextfoldersandjarfilestobeloadedusingextensionsclassloader
SystemClassLoader
JavaclassesthatareavailableinthejavaclasspathareloadedusingSystemclassloader
Q5.WriteyourownArrayListinJava?
Yourowncodehere.
Q6.Howtoreadandwriteimagefromafile?
Ans:YoucanuseImageIo.read()andImageIO.write()methodofjavax.imageiopackage.
Q7.Whatisdifferencebetweenstaticandinitblockinjava.
AnswerHere.
Q8.HowConcurrentHashMapworks?
Ans:ThebasicdesignofConcurrentHashMapistohandlingthreading.Basicallyitlockseachofthebox(bydefault
16)whichcanbelockedindependentlyandthreadsafeforoperation.Anditdoesnotexposetheinternallock
process.
Q9.Canastaticblockthrowexception?
Ans:Yes.Wecanthrowcheckedexception.

Q10.Whatisdifferencebetweeniteratoraccessandindexaccess?
Ans:Basicallyiteratoraccessprocessthetraverseoperationthrougheachelement,whereindexaccessprocess
accessdirecttheelementbyusingtheindex.
Q11.Whycharacterarrayisbetterthanstringforstoringpasswordinjava?
Ans:Because,characterarraystoresdatainencryptedformatwhichisnotreadablebyhuman.But,thestring
storesthedatainhumanreadableformatwhichisnotsecure.
Q12.whatisdaemonthreadinjava?
Ans:Adaemonthreadisnormallyrunsonbackground.AnditdoesnotpreventtheJVMfromexitingwhenthe
programfinishesbutthethreadisstillrunning.
Q13.WhatisJavaReflectionAPI?
Ans:Reflectionisoneofthemostpowerfulapiwhichhelptoworkwithclasses,methodsandvariables
dynamically.Basicallyitinspecttheclassattributesatruntime.Alsowecansayitprovidesametadataaboutthe
class.
Q14.WhatisthedifferencebetweenSerializableandExternalizableinterfaces?
Ans:Bothinterfacesareusedforimplementserialization.But,thebasicdifferenceisSerializableinterfacedoesnot
haveanymethod(itsamarkerinterface)andExternalizableinterfacehaving2methodssuchasreadExternal()and
writeExternal().SerializableinterfaceisthesuperinterfaceforExternalizableinterface.