0% found this document useful (0 votes)
43 views13 pages

Modified Ass1

This passage discusses questions about Java database connectivity (JDBC) concepts. It provides multiple choice questions and answers about using PreparedStatements, retrieving data from ResultSets, registering JDBC drivers, moving the cursor in a ResultSet, and ResultSet properties.

Uploaded by

Uttara B
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views13 pages

Modified Ass1

This passage discusses questions about Java database connectivity (JDBC) concepts. It provides multiple choice questions and answers about using PreparedStatements, retrieving data from ResultSets, registering JDBC drivers, moving the cursor in a ResultSet, and ResultSet properties.

Uploaded by

Uttara B
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Quest

ion1of60:
JSTLI
ntr
oduct
ion

Whatget
spr
int
edwhent
hef
oll
owi
ngJSTLcodef
ragmenti
sexecut
ed?

<%@ tagli
buri="
htt
p:/
/jav
a.sun.
com/ j
sp/
jst
l/
cor
e"pref
ix="
c"%>
<c:f
orEachvar="
it
em"begin="0"end="
12"st
ep="
3">
${i
tem}
</c:
forEach>
1.0,3,
6,9,
12
2.3,6,
9,12
3.0,6,
9,12
4.0,3,
6,9
Answer- 1

Quest
ion2of60:
JSTLI
ntr
oduct
ion

Whatwi
l
lbet
heout
putoft
hef
oll
owi
ngcodesni
ppet
?

-<%@ t agliburi
="http:
//j
ava.
sun.
com/
jsp/
jst
l/
cor
e"pr
efi
x="
c"%>…….
.<c:
setv
ar="
it
em"
val ue="5"
/>
<c: outvalue="
${ i
tem}"/
>
<c: i
ftest=" ${
item==5}">
Item isequal to5
</ c:i
f>
1.5I t
em isequal to5
2.5
3.JSPExcept ion
Answer -1

Quest
ion3of60:
JDBCBasi
cConcept
s

Fi
llinthebl ank.
Thisisanexampl eofpr eparedstatementinter
facethat__
__ _
____
___
___
PreparedStat ementst mt =con.
prepareSt
atement (
"sel
ect*from emp")
;
ResultSetrs=st mt .executeQuery()
;
while(
rs.next (
)){
System. out.pri
nt l
n(rs.getInt
(1)
+""+rs.
getStr
ing(2)
);
}
1.Deletest her ecor d
2.Retrievest her ecord
3.Updat est her ecord
4.Insertsther ecor d
Answer -2

Quest
ion4of60:
JDBCBasi
cConcept
s

Howcany ouretri
eveinfor
mat i
onfrom aResul t
Set?
1.Byinv okingthemet hodget(.
..
,Str
ingt ype)ontheResul
tSet,wheret
ypei sthe
databaset ype
2.Byinv okingthemet hodget(.
..
,Typet ype)ontheResult
Set,whereTypeisan
objectwhi chrepresentsadatabaset y
pe
3.Byinv okingthemet hodgetValue(.
..
),andcasttheresul
ttothedesir
edJav atype.
4.Byinv okingthespecialget
termet hodsont heResult
Set:get
Stri
ng(.
..
),getBool
ean
(.
..
),getClob(..
.)
Answer
-4

Quest
ion5of60:
JDBCBasi
cConcept
s

Whichofthefol
l
owingiscorr
ectaboutDri
ver
Manager.
regist
erDr
iver
()methodcall
?
1.Thi
smet hodi
susedtoregist
erthedat
abasedri
ver
.
2.Thi
sstati
cmethodisusedincaseyouareusi
nganon- JDKcompliantJVM,such
astheoneprovi
dedbyMicrosoft
.
3.All
oftheabove
4.Noneoftheabove
Answer-
3

Quest
ion6of60:
JDBCBasi
cConcept
s

I
nthesni
ppetbelow,whatl
i
neofcodeneedst
obeaddedt
omov
ethecur
sort
othe
3r
drowintheresul
tset
?

Class.forName( "
oracle.
jdbc.
dri
ver.Or
acleDri
ver"
);
Connect ion
con=Dr iverManager .
getConnection("
jdbc:
oracl
e:t
hin:
@local
host:
1521:xe",
"syst
em",
"or
acle");
Statement
stmt =con.createStatement(Result
Set.TYPE_SCROLL_SENSITI
VE,Result
Set.CONCUR_
UPDATABLE) ;
Resul t
Setr s=stmt.executeQuery("
sel
ect*f r
om emp765");
1.rs.mov e(3) ;
2.rs.next(3)
3.rs.absolut e(
3);
4.rs.getString(3)
;

Quest
ion7of60:
JDBCBasi
cConcept
s

Whichofthefol
lowi
ngmeansthatt
heResul
tSetcanonl
yber
ead?
1.Resul
tSet
.CONCUR_READ_ONLY
2.Resul
tSet
.CONCUR_UPDATABLE
3.Resul
tSet
.READ_ONLY
4.Resul
tSet
.UPDATABLE

Quest
ion8of60:
JDBCBasi
cConcept
s

Whatisthemeani ngofResult
Set.TYPE_SCROLL_ I
NSENSI TI
VE?
1.ItmeansthattheResult
Setisinsensit
ivet
oscroll
ing
2.ItmeansthattheResult
setissensiti
vetoscrol
li
ng,butinsensi
ti
vet
oupdates,
that
i
s,notupdateable
3.ItmeansthattheResult
setisscroll
ablebutgeneral
lynotsensi
ti
vet
ochangest o
thedatathatunderl
i
estheResultSet
4.Themeani ngdependsonthety peofdatasource,andthetypeandver
sionofthe
dri
veryouusewi t
hthisdatasource

Quest
ion9of60:
UMLFundament
als
Youarecreat
ingaclassdiagram usi
ngUMLandy ouneedtoshowthatoneofy our
cl
assesisanabstractcl
ass.Howwoul dyoudot hat?
1.Under
li
nethenameoft hecl assi
nt hediagr
am.
2.Drawadottedl
inebetweeni tandtheotherclasses.
3.Useit
ali
csfort
henameoft heclass.
4.Drawanarrowwi t
hahol l
owdi amondheadbet weeni
tandtheot
herclasses.
Answer-
3

Quest
ion10of60:
UMLFundament
als

I
nacomponentdi agr
am, howwouldy oui
ndi
cat
eadependency
?
1.Asol
idli
nebetweenthet wo.
2.Adashedarr
owbet weent het
wo.
3.Asol
idbi-
dir
ecti
onalar
rowbet weenthet
wo.
4.Aci
rcl
econtaini
ngthetwo.

Quest
ion11of60:
Desi
gnPat
ter
nsi
nJav
a

Youneedt oprovi
deawayt oaccesstheelement
sofanaggr egat
eobject
sequenti
all
y,wit
houtexposi
ngtheunderl
yi
ngrepresent
ati
on.Whichdesignpat
ter
n
shouldyouapply?
1.Buil
der
2.It
erat
or
3.Observer
4.Command
Answer -
2

uest
ion12of60:
Desi
gnPat
ter
nsi
nJav
a

Whichdesi gnpatt
ernwouldyouuset
odecoupleanabstract
ionf
rom i
ts
i
mpl ement at
ionsothatt
hetwocanvaryi
ndependent
ly?
1.Singleton
2.Bridge
3.Adapt or
4.Factory

Quest
ion13of60:
Ser
vlet
sBasi
cs

Whichofthesei str
ueabouti ncl
udedirectiv
e?
1.Whenusi ngtheincl
udedi r
ectiv
e,theJSPcont ai
nertreat
sthefil
etobeincl
udedas
i
fitwaspar toftheori
ginalfi
le
2.TheXMLsy ntaxofi
ncludedi r
ecti
veis<jsp:i
ncl
udefil
e="fi
l
eName" /
>
3.Thecontentoff i
lei
ncludedusingincludedir
ecti
ve,cannotref
ertovar
iabl
eslocal
totheori
ginalpage
4.Theincl
udedf il
emusthav ejspfextension

Quest
ion14of60:
Ser
vlet
sBasi
cs

Whi
choft
hef
oll
owi
ngopt
ionsr
epr
esent
stheXMLequi
val
entoft
hisst
atement
?

<%@ incl
udef
il
e="a.
jsp"
%>
1.<j
sp:i
ncl
udefi
l
e="a.j
sp"/
>
2.<j
sp:
i
ncludepage="a.
jsp"/>
3.<j
sp:
dir
ecti
ve.
incl
udef i
le="a.
jsp"
/>
4.Ther
eisnoXMLequi valentofincl
udedi
rect
ive.

Quest
ion15of60:
Ser
vlet
sBasi
cs

Whichofthef ol
lowingisusedt
oredi
rectt
her
esponsef
rom aser
vlett
oaJSPpage?
1.r
esponse.sendRedi r
ect(
)
2.r
equest.
sendRedi rect
()
3.r
equest.
forwar d(
)
4.r
esponse.forward()

Quest
ion16of60:
Ser
vlet
sBasi
cs

Gi
ven:

1.publ
icclassSer vletXext endsHt tpServ l
et{
2.publ i
cv oiddoGet (HttpServletRequestr eq,
3. HttpSer vl
etResponser es)
4. throwsI OExcept ion,Serv l
etExcept i
on{
5. req.getSessi on( ).
setAttri
but e("key",newX( ));
6. req.getSessi on( ).
setAttri
but e("key",newX( ));
7. req.getSessi on( ).
setAttri
but e("key","x");
8. req.getSessi on( ).
remov eAttr i
but e(
"key ")
;
9.}
10.}
andgivenal istenercl ass:
11.publi
ccl assXi mpl ement sHt tpSessi onBi ndingListener{
12.publ i
cv oidv alueBound( HttpSessi onBi ndingEv entevent){
13. Sy stem. out.print("
B");
14.}
15.publ i
cv oidv alueUnbound( Ht tpSessi onBi ndingEventevent){
16. Sy stem. out.print("
UB" )
;
17.}
18.}

Whichl
oggi
ngout
putwoul
dbegener
atedbyani
nvocat
ionoft
hedoGetmet
hod?
1.UBUBUB
2.BUBBUB
3.BBUBUBB
4.BUBBUBB

Quest
ion17of60:
Ser
vlet
sBasi
cs

I
denti
fythecorr
ectser
v l
etl
if
ecy cle.
1.ser
vletl
oadi
ng,ser
vleti
nstance, i
nit
,ser
vice,
anddest
roy
2.i
nit
,serv
letl
oadi
ng,servl
etinstance,ser
vice,
anddest
roy
3.i
nit
,ser
vleti
nst
ance,ser
vletl
oadi
ng,serv
ice,
anddestr
oy
4.i
nit
,ser
vice,
destr
oy,
servl
etinst
ance,andservl
etl
oadi
ng

Quest
ion18of60:
Ser
vlet
sBasi
cs

Whatget
spr
int
edwhent
hef
oll
owi
ngi
scompi
l
ed?

<%i
nty=0;%>
<%i
ntz=0;%><%f
or(
intx=0;
x<3;
x++){%>
<%z++;
++y
;%>
<%}%>

<%if(
z<y){
%>
<%=z%>
<%}else{%>
<%=z-1%>
<%}%>
1.0
2.1
3.2
4.3

Quest
ion19of60:
WebAppl
i
cat
ionBasi
cs

ToSpeci f
yanAut henti
cati
onMechani
sm i
ntheDepl
oymentDescr
ipt
or,
whi
choft
he
fol
lowi ngelementwoul dbeused?
1.secur it
y-constr
aint
2.l
ogi n-config
3.auth- method
4.for
m- l
ogin-confi
g
Correct-2

Quest
ion20of60:
WebAppl
i
cat
ionBasi
cs

WhenusingHTMLf orms,whichofthefol
l
owingistr
ueforPOSTmethod?
1.POSTallowsuserstobookmarkURLswithparameter
s.
2.ThePOSTmet hodshouldnotbeusedwhenlargeamountofdat
aneedstobe
tr
ansfer
red.
3.POSTallowssecuredat
atransmissi
onovert
hehttpmethod.
4.POSTmet hodsendsdatainthebodyofther
equest.

Quest
ion21of60:
WebAppl
i
cat
ionBasi
cs

Ausert
ypest
heURLi
nabr
owser
:

htt
p:/
/www.j
avat
rai
ning.
com/
GH/
index.
html
.Whi
chHTTPr
equestget
sgener
ated?
1.GETmethod
2.POSTmethod
3.HEADmethod
4.PUTmethod
Corr
ect
-1

Quest
ion22of60:
JSPAct
ions
Fi
lli
nthebl ank.
Whenusi ngthe<jsp:
useBean/ >t oref
erenceaJav
aBeanf
orusewi
thi
naJSP,
thei
d
att
ri
butedef i
nes____
__ _
__ _
_____.
1.Theclassnameoft heJav aBean
2.Thepackagenameoft heJavaBean
3.Theinstancenameoft heJav aBean
4.Defi
nesnot hi
ngast hereisnoi datti
rbute

Quest
ion23of60:
JSPAct
ions

Givenaser
vlett
hatst
oresacust
omerbeani
nthesessi
onscopewi
tht
hef
oll
owi
ng
codesni
ppet:

1.publicvoi ddoPost (HttpSer v l


etRequestreq,
2. HttpServletResponser esp){
3. HttpSessi onsessi on=r eq. get
Session();
4. com. exampl e.Customercust
5. =newcom. exampl e.Cust omer ()
;
6. cust.setName( req.
get Par amet er
("f
ull
_name")
);
7. session. setAttri
bute("cust omer "
,cust)
;
8. Request Dispatcherpage
9. =r eq. getRequest Dispat cher (
"page.j
sp")
;
20. page. forwar d(r
eq, r
esp) ;
21.}

Whi
choft
hesecompl
eteJSPswi
l
lpr
intt
hecust
omer
'sname?

A.1.<%=cust omer .get Name( )%>


B.1.<jsp:useBeani d=" customer "
2.ty pe="com. exampl e.Customer "
3. scope=" sessi on"/>
4.<%=cust omer .
get Name( )%>
C.1.<jsp:useBeani d=" customer "
2. type="com. exampl e.Customer"
3. scope=" sessi on">
4.<%=cust omer .
get Name( )%>
5.</j
sp:useBean>
D.1.<jsp:useBeani d=" customer "
2. t
y pe="com. exampl e.Customer"
3. scope=" sessi on"/>
4.<jsp:getProper t
yname=" customer"
5. proper t
y=" name"/ >
1.AandB
2.AandC
3.BandC
4.BandD

Quest
ion24of60:
Ser
vletLi
stener
s

Whichli
stener(
s)isusedt otracksessi
onat
tri
but
e?
1.Htt
pSessionBindingLi
stener
2.Htt
pSessionAttr
ibuteLi
stener
3.Htt
pSessionList
ener
4.All
oftheabov e
Corr
ect
-2

Quest
ion25of60:
Ser
vletLi
stener
s

Whichtypeofl i
stenerandl i
stenermethodcanbeusedt ocal
lcl
ose(
)wheneachof
theappli
cati
on'susersi sfi
nishedwiththeconnect i
on?
1.Htt
pSessionListenerandi t
ssessionDestroyedmet hod
2.Serv
letAtt
ribut
eListenerandi t
sattr
ibuteRemovedmet hod
3.Serv
letRequestList
enerandt herequestDestroyedmethod
4.RequestDispatcherLi
steneranditsforwardI
niti
atedmethod
Corr
ect-
1

Quest
ion26of60:
Ser
vletFi
l
ter
s

Whichofthef ol
l
owingarecorrectwi
thf
il
ter
?
1.Modifi
esrequest/r
esponse
2.Usedforlogging/
audit
ing
3.Securi
tychecks
4.Alloft
heabov e
Corr
ect-
4

Quest i
on27of60: Lear
nJavaUnitTest
ing
Whi choft hefol
lowingannot
ati
onscausesthatmet
hodr
unoncebef
oreanyoft
he
testmet hodsint hecl
ass?
1.@Test
2.@Bef ore
3.@Bef oreClass
4.@Af terClass

Quest
ion28of60:
Lear
nJav
aUni
tTest
ing

Whichoft hefoll
owingdescribesUnitTest
ingcorrect
ly?
1.UnitTestingi
st heprocessofcheckingwhethertheappl
icat
ioni
swor
kingasper
requi
rement s.
2.Unittesti
ngisthetesti
ngofasi ngl
eenti
ty(classormethod).
3.All
oft heabove
4.Noneoft heabov e

Quest
ion29of60:
Cor
eJav
a

Whatisthebasi
sforequal
i
tyst
atei
nJav
aIdent
it
yHashmap?
1.HashCodeandequals
2.Name
3.Ref
erence
Quest
ion30of60:
Cor
eJav
a

I
nJav a,
whichofthefollowingcanbemar kedstati
c?
1.Methods,Var
iabl
es,Init
ial
izati
onBl ocks,OuterCl
asses,andNest
edCl
asses
2.Methods,Var
iabl
es,Init
ial
izati
onBl ocks,andNestedClasses
3.Methods,Var
iabl
es,Init
ial
izati
onBl ocks,andOuterClasses
4.Methods,Var
iabl
es,andI nit
ial
izat
ionBl ocks
Cor
rect-
2

Quest
ion31of60:
Cor
eJav
a

Whatist
heoutputoft hefollowingJav acodesni ppet
?
publ
i
cclassTestimpl ement sRunnabl e
{
publ
i
cv oidr un()
{
Syst em.out .
print
f("
%d" ,
3);
}
publ
i
cst aticv oi
dmai n(Str
ing[]args)throwsInt
err
uptedExcept
ion
{
Thr eadthr ead=newThr ead(newTest(
));
thread.start()
;
Syst em.out .
print
f("
%d" ,
1);
thread.j
oin( );
Syst em.out .
print
f("
%d" ,
2);
}

}
1.132
2.123
3.213
4.312

Quest
ion32of60:
Cor
eJav
a

Whichoft
hef ol
lowi
ngstat
ement sisfal
seaboutJavamainmethod?
1.Wecanov err
idemainmethod.
2.Mainmethodshouldbedeclaredpubl
icandstat
ic.
3.Mainmethodshouldhav
eonl y1argumentoftypeStr
ingar
ray.
4.Wecanov erl
oadmainmethod.

Quest
ion33of60:
Cor
eJav
a

HTTP2Cl ientAPIi
sint
roducedi
nJav
a9.
1.True
2.False
Correct
-True
Quest
ion34of60:
Cor
eJav
a

Picktherightstat
ementaboutcr eat
ingacustom Javaannotati
on.
1.Annotationsarecr
eatedbyusi ng@interf
ace,f
oll
owedbyannot ationname.
2.Anannot ati
oncanhav eelementsaswel l
.Theylookl
ikemet hods.Weshouldnot
provi
deimpl ementat
ionfortheseelements.
3.Allannotati
onsextendsjava.
lang.
annotati
on.
Annotat
ioninterf
ace.Annotat
ions
cannotincludeanyextendsclause.
4.Alloftheabov e
Corr
ect-4

Quest
ion35of60:
Cor
eJav
a

WhatisthemaxcapacityofaJav
aBl
ocki
ngQueue?
1.I
nteger.
INFI
NITY
2.I
nteger.
MAX_ VALUE
3.Bi
gDecimal.
MAX_ VALUE
Cor
rect-
2

Quest
ion36of60:
Cor
eJav
a

Whichofthefol
l
owi
ngi
sthei
mmut
abl
eJav
aLi
stst
ati
cfact
orymet
hod?
1.Li
st.
of
2.Li
st.
immutabl
e
3.Li
st.
creat
e

Quest
ion37of60:
Cor
eJav
a

Whatist
hecommandl
i
net
ool
int
roducedf
orJSengi
nei
nJav
a8?
1.j
j
s
2.j
ss
3.j
fs
4.j
bd

Quest
ion38of60:
Cor
eJav
a

WhichoftheseJavacodesnippetsisacorr
ectwayofdef
ini
nggener
icmet
hod?
1.publi
c❮T1,T2,…,
Tn❯met hodName{} ❮
2.T1,T2,…,Tn❯methodName( T1,T2,…,
Tn){}
3.All
oftheabove

Quest
ion39of60:
Cor
eJav
a

I
nJav a9,pri
vat
emet
hodsar
eal
l
owedi
nInt
erf
aces.
1.True
2.False
Answer-Tr
ue

Quest
ion40of60:
Cor
eJav
a

Javasystem pr
oper
ti
escanbesetormodi
fi
edatr
unt
ime.
1.True
2.False
Answer
-Tr
ue

Quest
ion41of60:
Cor
eJav
a

I
dentifyt
heJav aclassusedt
ocr
eat
eanewPr
ocess.
1.ProcessBuil
der
2.ProcessFactor
y
3.Process
4.Thread

Quest
ion42of60:
Cor
eJav
a

Pi
ckthecor rectJavamethodr
efer
enceusages.
1.object
::i
nstanceMethod
2.Class:
:stati
cMethod
3.Class:
:new
4.Alloft
heabov e

Quest
ion43of60:
Cor
eJav
a

WhichisthecorrectJavacodesni ppettobeusedt ocreat


eaFunct
ional
Int
erf
ace?
1.i
nter
faceMy Functional
Int
erfaceimplement sFunct
ional
{
2."
@Funct i
onalI
nterf
aceinterf
aceMy Funct
ionalI
nter
face{
"
3."
@Funct i
onalinter
faceMy Functi
onalInt
erface{"

Quest
ion44of60:
Spr
ingAOP

Whatisadv i
ce?
1.Aconcernthatcutsacr
ossmul t
ipl
eclasses
2.Theprocessofli
nkingaspect
swi t
hotherappl
i
cati
ont
ypes
3.Acti
ontakenbyanaspectatapar ti
cul
arjoi
npoint
4.Amet hodtoimplementtr
ansacti
onmanagement
Corr
ect-3

Quest
ion45of60:
Spr
ingAut
o-Wi
ri
ng

Whatattr
ibuteisaddedint
hebean.
xml
tor
educeorel
i
minat
etheneedof<pr
oper
ty>
and<constructor
-ar
g>?
1.Autodi
scov er
y
2.Autowi
re
3.Scope
4.Auto-
detect

Quest
ion46of60:
Spr
ingCor
eConcept
sandLi
fecy
cle

Whichofthefoll
owingexampl essummar i
zesProgr
am t
oani
nter
facer
athert
hanan
i
mplementati
on?
1.Mapm=newHashMap( );
2.Arr
ayLi
stli
st=newArrayLi
st();
3.Arr
ayLi
st<I
nteger
>=newAr rayList
<Int
eger
>()
;
4.St
ri
ngs="
Hel
l
oWor
ld"
;

Quest
ion47of60:
Spr
ingDependencyCheck,
InnerbeansandScopes

I
fanyoft hebeansi mpl ement stheBeanPost
Processori
nter
face,
Spr
ingwi
l
lcal
l
whichoft hesemet hods?
1.processBeforeI
niti
alizati
on()
2.BeanPost Pr
ocessor ()
3.postProcessI
nterface()
4.postProcessBeforeIniti
ali
zati
on()
Answer -
4

Quest
ion48of60:
Spr
ingDependencyCheck,
InnerbeansandScopes

WhichCol l
ect
ionselement sdoesSpringsuppor
t?
1.Li
st,hashmap, arr
ayl
ist,andset
2.Li
st,props,hashmaps, andarr
ayli
st
3.Li
st,set,map,andprops
4.Hashmaps, array
li
st,
list,andt
reemap

Quest
ion49of60:
Spr
ingDependencyCheck,
InnerbeansandScopes

WhatwillbetheresultifyouuseWeb- awar
eSpr
ingAppl
i
cat
ionCont
extscopesi
na
regul
arSpri
ngIoCcont ainer?
1.Itwi
ll
returnnothi
ng.
2.Itwi
ll
returnaNullPointerExcept
ion.
3.Itwi
ll
returnaIl
legalStateExcept
ion.
4.Itwi
ll
wor kcorr
ectly.

Quest
ion50of60:
Spr
ingDependencyCheck,
InnerbeansandScopes

WhichBeanscopesar ev al
idonl
yinthecont
extofaweb-
awar
eSpr
ing
Appli
cati
onContext?
1.Si
nglet
onandPr ototype
2.Sessi
on,GlobalSession,andRequest
3.Si
nglet
on,Prototype,Request,
andSession
4.Sessi
on,Si
ngleton, andGlobal
Session

Quest
ion51of60:
Spr
ingDependencyCheck,
InnerbeansandScopes

Tousej ava.
uti
l
.Li
st,
whati
stheSpr
ingCol
l
ect
ionsel
ementt
haty
ouneed?
1.<l
ist>
2.<List>
3.<l
ists>
4.<util
:l
i
st>

Quest
ion52of60:
Spr
ingDependencyCheck,
InnerbeansandScopes

Whi
choft
hebel
owar
ebenef
it
sofusi
ngDI
?

A.Tightcoupl
i
ng
B.Loosecoupli
ng
C.Easytest
ing
D.Remov i
ngrunt
imeer
ror
s
1.AandB
2.BandC
3.CandD
4.DandA
Answer-
2

Quest
ion53of60:
Spr
ingJav
aConf
igur
ati
on

ForJava-basedconfi
gur
ati
on,whichisthecl
asst
hatset
stheSpr
ingCont
ext
?
1.Annotati
onconfi
g
2.Component Scan
3.Annotati
onConfi
gAppl
icat
ionContext
4.Annotati
onConfi
gAppl
icat
ion

Quest
ion54of60:
Spr
ingJDBC

Whichannotati
oncanbeusedi
nor
dert
ospeci
fyamet
hodast
ransact
ional
?
1.@Servi
ce
2.@Component
3.@Transacti
onal
4.@Scope
Answer-
3

Quest
ion55of60:
Spr
ingJDBC

Whatmethodshoul dbei
nvokedont
heconnect
ionobjectt
oensur
ethatt
heuser
-
managedtransact
ionhastobecommit
tedexpl
i
cit
ly?
1.set
Commi t(
fal
se)
2.set
Aut
oCommi t
(fal
se)
3.set
Rol
lBackOnly(
)
4.commit(
)

Quest
ion56of60:
Spr
ingJDBC

Whichoneoft hefoll
owingi
soneofthechallengesofTr
adit
ional
Transact
ion
Management ?
1.Transacti
onManagementatDatabaseConnect i
onLevel
2.Programmat i
cManagementoftransact
ions
3.Error-
proneConnecti
onManagement
4.Alloftheabove
Correct-
4

Quest
ion57of60:
Spr
ingORM andMVC

Whichi sthemaincomponenti
nSpr
ingWebMVC?
1.FacesServlet
2.ActionServ
let
3.ViewRender er
Servl
et
4.Dispatcher
Servlet
Answer -
4
Quest
ion58of60:
Spr
ingSt
ereot
ypeAnnot
ati
ons

Whatannotati
onwir
ingel ementi
saddedt
oscanpackagest
ofi
ndandr
egi
ster
beanswithi
ntheAppli
cationContext
?
1.<cont
ext:
annot
ati
on-config/>
2.<cont
ext:
annot
ati
on-scan/ >
3.<cont
ext:
component-confi
g/>
4.<cont
ext:
component-scan>
Answer-
4

Quest
ion59of60:
Spr
ingSt
ereot
ypeAnnot
ati
ons

I
nthef
oll
owi
ngexampl
e,whatt
ypeofaut
owi
rewi
l
lbeused?

@Aut owired(r
equir
ed=fal
se)
publi
cEmpl oyeeAutowi
redBy
Const
ruct
orSer
vice(
@Qual
i
fier
("empl
oyee"
)Empl
oyee
emp){
t
his.employee=emp;
}
1.ByName
2.ById
3.@Aut owired
4.Constructor

Quest
ion60of60:
Spr
ingSt
ereot
ypeAnnot
ati
ons

Whataredif
ferentval
idtypesofSpr i
ngbeanautowir
ing?
1.by
Name, byI
d, andconstructor
2.by
Name, byType,constructor,
@Aut owi
red,
and@Qual i
fi
erannot
ati
ons
3.by
Scope,byConstructor
, and@Aut owir
ed
4.ByI
d,by
NameScope, constructor
,and@Autowir
ed

You might also like