New Microsoft Office Word Document
-
Upload
avinashkakarla -
Category
Documents
-
view
43 -
download
0
description
Transcript of New Microsoft Office Word Document
![Page 1: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/1.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 1/70
Database connectivity with JDBC
1) JDBC is a Java API that is used to connect and execute query to the database?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
$) %hich o& these API re'resents that so&tware 'ro(ras can &oow to counicate with each other?
A) Inter&acesB) CassesC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: C) Both A & B
,) An API can be created &or
A) a''icationsB) ibrariesC) o'eratin( systesD) A entioned above!iew Answer " #ide Answer
ANSWER: D) All mentioned above
-) #ow any ty'es o& JDBC drivers avaiabe?
A) ,B) -C) $
![Page 2: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/2.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 2/70
D) .!iew Answer " #ide Answer
ANSWER: B) 4
.) In the &oowin( JDBC drivers which is /nown as 'artiay 0ava driver?
A) JDBC2DBC brid(e driver B) +ativeAPI driver C) +etwor/ Protoco driverD) Thin driver !iew Answer " #ide Answer
ANSWER: B) Native-AP driver
3) In the &oowin( JDBC drivers which are /nown as &uy 0ava driver?
A) +ativeAPI driverB) +etwor/ Protoco driverC) Thin driverD) Both B * C!iew Answer " #ide Answer
ANSWER: D) Both B & C
4) %hich driver uses 2DBC driver to connect to the database?
A) JDBC2DBC brid(e driver B) +ativeAPI driver C) +etwor/ Protoco driverD) Thin driver !iew Answer " #ide Answer
ANSWER: A) !DBC-"DBC brid#e driver
![Page 3: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/3.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 3/70
5) %hich driver converts JDBC cas directy into the vendors'eci&ic database 'rotoco?
A) +ativeAPI driverB) +etwor/ Protoco driverC) Thin driverD) Both B * C!iew Answer " #ide Answer
ANSWER: C) Thin driver
6) %hy 0ava 'ro(ra cannot directy counicate with an 2DBC driver?
A) 2DBC written in C7 an(ua(eB) 2DBC written in C an(ua(eC) 2DBC written in C88 an(ua(eD) +one o& the above!iew Answer " #ide Answer
ANSWER: B) "DBC $ritten in C lan#ua#e
19) #ow any ste's are used to connect any 0ava a''ication with the database in 0ava usin( JDBC?
A) .B) -C) ,D) 3!iew Answer " #ide Answer
ANSWER: A) %
11) %hich ethod o& Cass cass is used to re(ister the driver cass: This ethod is used to dynaicayoad the driver cass?
A) &or+ae;)B) (etConnection;)C) create<tateent;)D) execute=uery;)!iew Answer " #ide Answer
![Page 4: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/4.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 4/70
ANSWER: A) orName')
1$) The de&aut usernae &or the orace database is syste?
A) TrueB) Fase!iew Answer " #ide Answer
1,) >ive the ways to set Te'orary Path o& JD in %indows?
A) 2'en coand 'ro'tB) co'y the 'ath o& 0d/"bin directoryC) write in coand 'ro't@ set 'athco'ied'athD) A entioned above!iew Answer " #ide Answer
ANSWER: D) All mentioned above
1-) Abbrevate the ter D<+?
A) Di(ita <ource +aeD) Data <ource +aeC) Data <oc/et +ae
D) Data <trin( +ae!iew Answer " #ide Answer
ANSWER: D) Data Sour(e Name
1.) The de&aut usernae &or the ysq database is?
A) <yste
B) rootC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: B) root
![Page 5: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/5.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 5/70
13) The &oowin( exa'e to connect Java A''ication with access?i'ort 0avasqEcass Test
'ubic static void ain;<trin( arGH)try<trin( ur0dbc@odbc@ydsnECass&or+ae;sun0dbcodbcJdbc2dbcDriver)EConnection cDriverana(er(etConnection;ur)E<tateent stccreate<tateent;)EKesut<et rsstexecute=uery;seect &ro o(in)E
whie;rsnext;))<ysteout'rintn;rs(et<trin(;1))EL
Lcatch;Mxce'tion ee)<ysteout'rintn;ee)EL
LL
A) %ith D<+B) %ith out D<+C) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: A) With DSN
14) In Driverana(er cass which ethod is used to estabish the connection with the s'eci&ied ur?
A) 'ubic static void re(isterDriver;Driver driver)B) 'ubic static void dere(isterDriver;Driver driver)C) 'ubic static Connection (etConnection;<trin( ur)D) 'ubic static Connection (etConnection;<trin( ur:<trin( user+ae:<trin( 'assword)!iew Answer " #ide Answer
ANSWER: C) ubli( *tati( Conne(tion #etConne(tion'Strin# url)
15) In Connection inter&ace which ethod Dro's a chan(es ade since the 'revious coit"robac/?
A) 'ubic void robac/;)B) 'ubic void coit;)C) 'ubic void cose;)
![Page 6: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/6.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 6/70
D) 'ubic <tateent create<tateent;)!iew Answer " #ide Answer
ANSWER: A) ubli( void rollba(+')
16) %hich inter&ace 'rovides ethods to execute queries with the database?
A) Connection inter&aceB) <tateent inter&aceC) Kesut<et inter&aceD) +one o& the above!iew Answer " #ide Answer
ANSWER: B) Statement intera(e
$9) %hich aintains a cursor 'ointin( to a 'articuar row o& data:Initiay: cursor 'oints to be&ore the &irstrow?
A) Connection inter&aceB) <tateent inter&aceC) Kesut<et inter&aceD) +one o& the above!iew Answer " #ide Answer
ANSWER: C) Re*ultSet intera(e
$1) Kesut<et ob0ect can be oved &orward ony and it is u'databe?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: B) ,al*e
$$) %hich is used to execute 'araeteriNed query?
![Page 7: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/7.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 7/70
A) <tateent inter&aceB) Pre'ared<tateent inter&aceC) Kesut<et inter&aceD) +one o& the above!iew Answer " #ide Answer
ANSWER: B) PrearedStatement intera(e
$,) The 'er&orance o& the a''ication wi be &aster i& you use Pre'ared<tateent inter&ace becausequery is co'ied ony once?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
$-) This is an exa'e o& 're'ared stateent inter&ace that ?Pre'ared<tateent sttcon're'are<tateent;seect &ro e')EKesut<et rssttexecute=uery;)Ewhie;rsnext;))<ysteout'rintn;rs(etInt;1)8 8rs(et<trin(;$))EL
A) deetes the recordB) retrieve the recordC) u'dates the recordD) inserts the record!iew Answer " #ide Answer
ANSWER: B) retrieve the re(ord
$.) Kesut<etetaData inter&ace is use&u because it 'rovides ethods to (et etadata &ro theKesut<et ob0ect?
A) TrueB) Fase!iew Answer " #ide Answer
![Page 8: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/8.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 8/70
ANSWER: A) True
$3) By usin( %hich inter&ace Oou can store ia(es in the database in 0ava by the he' o& ?
A) Pre'ared<tateent inter&aceB) Kesut<etetaData inter&aceC) DatabaseetData inter&aceD) +one o& the above!iew Answer " #ide Answer
ANSWER: A) PrearedStatement intera(e
$4) Abbreviate the &u &or o& C2B?
A) Character ar(e 2b0ectB) Character oo' 2b0ectC) Coection ar(e 2b0ectD) Coection oo' 2b0ect!iew Answer " #ide Answer
ANSWER: A) Chara(ter ar#e "b.e(t
$5) %hich is used to ca the stored 'rocedures and &unctions: Caabe<tateent inter&ace?
A) Caabe<tateent Inter&aceB) Pre'ared<tateent Inter&aceC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: A) CallableStatement ntera(e
$6) The 'er&orance o& the a''ication wi be &aster i& you use Pre'ared<tateent inter&ace becausequery is co'ied ony once?
A) True
![Page 9: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/9.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 9/70
B) Fase!iew Answer " #ide Answer
ANSWER: A) True
,9) The ACID 'ro'erties does not describes the transaction ana(eent we ?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: B) ,al*e
,1) JDBC stands &or?
A) Java database connectivityB) Java database conce'tC) Java database counicationsD) +one o& the above!iew Answer " #ide Answer
ANSWER: A) !ava databa*e (onne(tivit/
,$) AKKAO:C2B:B2B and KMF ty'e couns can be u'dated in?
A) JDBC $9B) JDBC 19C) JDBC ,9D) JDBC -9!iew Answer " #ide Answer
ANSWER: C) !DBC 012
,,) In Transaction ana(eent o& JDBC which eans once a transaction has been coitted: it wireain so: even in the event o& errors: 'ower oss etc?
![Page 10: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/10.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 10/70
A) AtoicityB) IsoationC) ConsistencyD) Durabiity!iew Answer " #ide Answer
ANSWER: D) Durabilit/
,-) In Transaction ana(eent in JDBC Transaction re'resents?
A) sin(e unit o& wor/B) uti'e unit o& wor/C) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: A) *in#le unit o $or+
,.) which inter&aces 'rovide ethods &or batch 'rocessin( in JDBC?
A) 0avasq<tateentB) 0avasqPre'ared<tateentC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: C) Both A & B
MJB Advanced Java
1) MJB ;Mnter'rise Java Bean) is used to deveo' which ty'e o& a''ications in 0ava?
A) <caabeB) KobustC) <ecured
![Page 11: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/11.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 11/70
D) A entioned above!iew Answer " #ide Answer
ANSWER: D) All mentioned above
$) %hich iddeware services are 'rovided by MJB?
A) <ecurityB) Transaction ana(eentC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: C) Both A & B
,) In the deveo'ent o& MJB which version is &aster because o& si'icity and annotations such asQMJB: Q<tateess: Q<tate&u: QodeDriven: QPreDestroy: QPostConstruct etc?
A) MJB ,B) MJB $C) MJB 1D) +one o& the above!iew Answer " #ide Answer
ANSWER: A) E!B 0
-) MJB is i/e C2 'rovided by icroso&t but: it is di&&erent &ro?
A) Java BeanB) KIC) %eb <ervicesD) A entioned above!iew Answer " #ide Answer
ANSWER: D) All mentioned above
![Page 12: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/12.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 12/70
.) MJB is i/e C2: Abbreviate the ter C2?
A) Co'onent 2b0ect odeB) Co'onent 2riented odeC) Coon 2b0ect odeD) Coon 2riented ode!iew Answer " #ide Answer
ANSWER: A) Comonent "b.e(t 3odel
3) %hich is a serverside co'onent: it is required to be de'oyed on the server?
A) MJBB) KIC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: A) E!B
4) MJB technoo(y is buit on the to' o& <oc/et Pro(rain(?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: B) ,al*e
5) In MJB: which ust be written in 0ava an(ua(e?
A) Bean co'onentB) Bean cientC) Both A * BD) +one o& the above!iew Answer " #ide Answer
![Page 13: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/13.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 13/70
ANSWER: C) Both A & B
6) In MJB: iddeware services are 'rovided by MJB Container autoaticay?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
19) Foowin( are the disadvanta(es o&:
1) Kequires a''ication server$) Kequires ony 0ava cient,) Co'ex to understand and deveo' e0b a''ications
A) KIB) MJBC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: B) E!B
11) The i&e cyce o& session bean is not aintained by the a''ication server ;MJB Container)?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: B) ,al*e
1$) #ow any ty'es o& session beans are avaiabe in MJB?
A) $B) ,
![Page 14: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/14.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 14/70
C) -D) .!iew Answer " #ide Answer
ANSWER: B) 0
1,) In which session Bean conversationa state between uti'e ethod cas is not aintained by thecontainer in case o& ?
A) <tate&u <ession BeanB) <tateess <ession BeanC) <in(eton <ession BeanD) +one o& the above!iew Answer " #ide Answer
ANSWER: B) Statele** Se**ion Bean
1-) In which session bean aintain their state between cient invocations but are not required to aintaintheir state across server crashes or shutdowns?
A) <tate&u <ession BeanB) <tateess <ession BeanC) <in(eton <ession BeanD) +one o& the above!iew Answer " #ide Answer
ANSWER: C) Sin#leton Se**ion Bean
1.) In which ty'e an instances retain no data or conversationa state &or a s'eci&ic cient?
A) essa(eDriven BeanB) <ession BeanC) Mntity BeanD) +one o& the above!iew Answer " #ide Answer
ANSWER: A) 3e**a#e-Driven Bean
![Page 15: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/15.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 15/70
13) J< is aso /nown as a essa(in( service?
A) True
B) Fase!iew Answer " #ide Answer
ANSWER: A) True
14) Abbreviate the ter J<?
A) Java essa(e <ervice
B) Java onitor <erviceC) Java essa(e <essionD) Java onitor <ession!iew Answer " #ide Answer
ANSWER: A) !ava 3e**a#e Servi(e
15) J< is ainy used to send and receive essa(e &ro one a''ication to another?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
16) In the advanta(e o& J< which receive the essa(e: cient is not required to send request: essa(e
wi arrive autoaticay to the cient?
A) KeiabeB) AsynchronousC) Both A * BD) +one o& the above!iew Answer " #ide Answer
![Page 16: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/16.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 16/70
ANSWER: B) A*/n(hronou*
$9) In which ode o& essa(e doain is deivered to one receiver ony: where =ueue is used as aessa(e oriented iddeware ;2)?
A) PointtoPoint odeB) Pubisher"<ubscriber odeC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: A) Point-to-Point 3odel
$1) A essa(e driven bean is i/e state&u session bean that enca'suates the business o(ic and doesnRtaintain state?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: B) ,al*e
$$) In which co'onent Mntity bean re'resents the 'ersistent data stored in the database?
A) <erverside co'onentB) Cientside co'onentC) server and cient side co'onentD) +one o& the above!iew Answer " #ide Answer
ANSWER: A) Server-*ide (omonent
$,) In MJB these two ty'es o& entity beans are bean ana(ed 'ersistence and container ana(ed'ersistence are used in?
A) MJB $x
![Page 17: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/17.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 17/70
B) MJB ,xC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: A) E!B 15
$-) In which ty'e o& MJB it enca'suates the state that can be 'ersisted in the database:it isde'recated:+ow: it is re'aced with JPA ;Java Persistent API)?
A) Mntity BeanB) essa(e Driven BeanC) <ession BeanD) +one o& the above!iew Answer " #ide Answer
ANSWER: A) Entit/ Bean
$.) Mntity beans di&&er &ro session beans in severa ways they are?
A) 'ersistentB) Aow shared accessC) #ave 'riary /eysD) A entioned above!iew Answer " #ide Answer
ANSWER: D) All mentioned above
$3) MJB ,9 'rovides o'tion to de&ine database entity reationshi's"a''in(s i/e ?
A) 2ne to 2neB) 2ne to anyC) any to 2neD) any to anyM) A entioned above!iew Answer " #ide Answer
ANSWER: E) All mentioned above
![Page 18: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/18.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 18/70
$4) MJB is a s'eci&ication &or J$MM server: not a 'roductE Java beans ay be a (ra'hica co'onent inIDM?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
$5) MJB = is a =uery an(ua(e 'rovided &or navi(ation across a networ/ o& enter'rise beans andde'endent ob0ects de&ined by eans o& container ana(ed 'ersistence?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
$6) %hich re'resents 'ersistent (oba data &ro the database?
A) Mntity BeanB) <ession BeanC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: A) Entit/ Bean
,9) In MJB transaction ana(eent which case o& a session bean obtains the SserTransaction ob0ect viathe MJBContext usin( the (etSserTransaction;) ethod?
A) Beanana(ed transactionsB) Containerana(ed transactionsC) Both A * BD) +one o& the above!iew Answer " #ide Answer
![Page 19: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/19.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 19/70
ANSWER: A) Bean-mana#ed tran*a(tion*
,1) MJB is a s'eci&ication &or J$MM server: not a 'roductE Java beans ay be a (ra'hica co'onent inIDM?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
,$) To run MJB a''ication: you need an a''ication server ;MJB Container) such as Jboss: >ass&ish:%ebo(ic: %eb<'here etc It 'er&ors which o& the &oowin(?
A) i&e cyce ana(eentB) securityC) transaction ana(eentD) ob0ect 'ooin(M) A entioned above!iew Answer " #ide Answer
ANSWER: E) All mentioned above
,,) The MJB container 'rovide services to MJB co'onents they are?
A) Transaction su''ortB) Persistence su''ortC) +ain( su''ortD) A entioned above!iew Answer " #ide Answer
ANSWER: D) All mentioned above
,-) In which an MJB container ust 'rovide an i'eentation o& Java +ain( and Directory Inter&ace;J+DI) API to 'rovide nain( services &or MJB cients and co'onents?
![Page 20: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/20.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 20/70
A) Transaction su''ortB) Persistence su''ortC) +ain( su''ortD) A entioned above!iew Answer " #ide Answer
ANSWER: C) Namin# *uort
,.) In Mnter'rise Beans to accoodate a (rowin( nuber o& users: you ay need to distribute ana''ications co'onents across uti'e achines?
A) Transactions ust ensure data inte(rityB) The a''ication ust be scaabeC) The a''ication wi have a variety o& cientsD) A entioned above!iew Answer " #ide Answer
ANSWER: B) The ali(ation mu*t be *(alable
A''ets Java test
1) %hich is a s'ecia ty'e o& 'ro(ra that is ebedded in the web'a(e to (enerate the dynaic content?
A) Pac/a(eB) A''etC) Browser D) +one o& the above!iew Answer " #ide Answer
ANSWER: B) Alet
$) A''et runs inside the browser and wor/s at cient side?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
![Page 21: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/21.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 21/70
,) In the &oowin( stateents which is a drawbac/ &or A''et?
A) It wor/s at cient side so ess res'onse tie
B) <ecuredC) It can be executed by browsers runnin( under any 'at&ors: incudin( inux: %indows: and ac 2setcD) Pu(in is required at cient browser to execute a''et!iew Answer " #ide Answer
ANSWER: D) Plu#in i* re6uired at (lient bro$*er to e5e(ute alet
-) The 0avaa''etA''et cass - i&e cyce ethods and 0avaawtCo'onent cass 'rovides how anyi&e cyce ethods &or an a''et?
A) $B) ,C) 1D) -!iew Answer " #ide Answer
ANSWER: C) 7
.) %hich i&e cyce ethod o& an a''et 0avaawtCo'onent cass 'rovides?
A) 'ubic void 'aint;>ra'hics ()B) 'ubic void destroy;)C) 'ubic void sto';)D) 'ubic void init;)!iew Answer " #ide Answer
ANSWER: A) ubli( void aint'8rahi(* #)
3) %hich is invo/ed a&ter the init;) ethod or browser is axiiNed?
A) 'ubic void start;)B) 'ubic void 'aint;>ra'hics ()C) Pubic void sto';)
![Page 22: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/22.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 22/70
D) Pubic void init;)!iew Answer " #ide Answer
ANSWER: A) ubli( void *tart')
4) %hich is the correct order &or i&ecyce o& an a''et?
A) A''et is intiaiNed:started:'ainted:destroyed:sto''edB) A''et is 'ainted:started:sto''ed:initiaiNed:destroyedC) A''et is initiaiNed:started:'ainted:sto''ed:destroyedD) +one o& the above!iew Answer " #ide Answer
ANSWER: C) Alet i* initiali9ed*tartedainted*toedde*tro/ed
5) To run an A''et which o& these used?
A) By ht &ieB) By A''et!iewer too;&or testin( 'ur'ose)C) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: C) Both A & B
6) Java Pu(in so&tware is not res'onsibe to ana(e the i&ecyce o& an A''et?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: B) ,al*e
19) 0avaa''et de&ines how any inter&aces?
![Page 23: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/23.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 23/70
A) $B) ,C) -D) .!iew Answer " #ide Answer
ANSWER: B) 0
11) %hich Caed when an a''et be(ins execution: It is the &irst ethod caed &or any a''et?
A) void init;)B) void destroy;)C) booean isActive;)D) +one o& the above!iew Answer " #ide Answer
ANSWER: A) void init')
1$) %hen an a''et be(ins: the A%T cas the &oowin( ethods: in this sequence?
A) init;):'aint;):start;)B) <tart;):'aint;):init;)C) intit;):start;):'aint;)D) 'aint;):start;):init;)!iew Answer " #ide Answer
ANSWER: C) intit')*tart')aint')
1,) when an a''et is terinated the &oowin( sequence o& ethods cas ta/es 'ace?
A) sto';):'aint;):destroy;)B) destroy;):sto';):'aint;)C) destroy;):sto';)D) sto';):destroy;)!iew Answer " #ide Answer
ANSWER: D) *to')de*tro/')
![Page 24: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/24.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 24/70
1-) This ethod is used to sus'end threads that dont need to run when the a''et is not visibe?
A) destroy;)
B) 'aint;)C) sto';)D) start;)!iew Answer " #ide Answer
ANSWER: C) *to')
1.) %hich ethod is caed ony once durin( the run tie o& your a''et?
A) sto';)B) 'aint;)C) init;)D) destroy;)!iew Answer " #ide Answer
ANSWER: C) init')
13) The APPMT ta( is used to start an a''et &ro both an #T docuent and &ro an a''et viewer?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
14) %hich is a required attribute that (ives the nae o& the &ie containin( your a''ets co'ied cass&ie?
A) C2DMB) C2DMBA<MC) ATD) +AM!iew Answer " #ide Answer
![Page 25: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/25.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 25/70
ANSWER: A) C"DE
15) A''et wor/s at cient side so ess res'onse tie?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
16) A''et runs inside the browser and does not wor/s at cient side?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: B) ,al*e
$9) In A''et which are coon security restrictions?
A) A''ets canRt oad ibraries or de&ine native ethodsB) An a''et canRt read every syste 'ro'ertyC) A''ets can 'ay soundsD) Both A * B!iew Answer " #ide Answer
ANSWER: D) Both A & B
$1) %hich Invo/ed iediatey a&ter the start;) ethod: and aso any tie the a''et needs to re'aintitse& in the browser?
A) sto';)B) init;)C) 'aint;)D) destroy;)!iew Answer " #ide Answer
![Page 26: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/26.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 26/70
ANSWER: C) aint')
$$) An a''et can 'ay an audio &ie re'resented by the AudioCi' inter&ace in the 0avaa''et 'ac/a(eThe AudioCi' inter&ace has how any ethods?
A) $B) ,C) 1D) -!iew Answer " #ide Answer
ANSWER: B) 0
$,) An a''et can 'ay an audio &ie re'resented by the AudioCi' inter&ace in the 0ava:a''et 'ac/a(eCauses the audio ci' to re'ay continuay in which ethod?
A) 'ubic void 'ay;)B) 'ubic void oo';)C) 'ubic void sto';)D) +one o& the above!iew Answer " #ide Answer
ANSWER: B) ubli( void loo')
$-) The &oowin( exa'e shows the creation o& ai'ort 0avaa''etEi'ort 0avaawtE
'ubic cass ain extends A''et'ubic void 'aint;>ra'hics ()(draw<trin(;%ecoe in Java A''et:-9:$9)ELL
A) Banner usin( A''etB) Basic A''etC) Dis'ay coc/D) +one o& the above!iew Answer " #ide Answer
![Page 27: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/27.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 27/70
ANSWER: B) Ba*i( Alet
$.) A''ets cannot a/e networ/ connection exce'tion to the server host &ro which it ori(inated?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
Java I"2 Pac/a(e
1) A strea is a sequence o& dataIn Java a strea is co'osed o&?
A) BytesB) BitsC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: A) B/te*
$) %hich strea does Java a''ication uses to read data &ro a source: it ay be a &ie: an array:'eri'hera device or soc/et?
A) In'ut<treaB) 2ut'ut<treaC) In'ut"2ut'ut<treaD) +one o& the above!iew Answer " #ide Answer
ANSWER: A) nutStream
,) These coony used ethods o&
![Page 28: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/28.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 28/70
1) 'ubic abstract int read;)throws I2Mxce'tion$) 'ubic int avaiabe;)throws I2Mxce'tion,) 'ubic void cose;)throws I2Mxce'tion
A) 2ut'ut<trea cassB) In'ut<trea cassC) In'ut"2ut'ut<trea cassD) +one o& the above!iew Answer " #ide Answer
ANSWER: B) nutStream (la**
-) %hich is used &or writin( data to a &ie in &ie handin(?
A) FieIn'ut<treaB) Fie2ut'ut<treaC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: B) ,ile"ututStream
.) %hich is used &or readin( streas o& raw bytes such as ia(e data For readin( streas o& characters:consider usin( FieKeader?
A) FieIn'ut<treaB) Fie2ut'ut<treaC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: A) ,ilenutStream
3) %hich is Coony used ethods o& ByteArray2ut'ut<trea cass?
A) ByteArray2ut'ut<trea;)B) ByteArray2ut'ut<trea;int siNe)C) 'ubic synchroniNed void writeTo;2ut'ut<trea out) throws I2Mxce'tionD) Both A * B!iew Answer " #ide Answer
![Page 29: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/29.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 29/70
ANSWER: C) ubli( */n(hroni9ed void $riteTo'"ututStream out) thro$* "E5(etion
4) <equenceIn'ut<trea cass is used to read data &ro?
A) <in(e <treaB) uti'e streasC) utieve <treasD) +one o& the above!iew Answer " #ide Answer
ANSWER: B) 3ultile *tream*
5) %hich is used an interna bu&&er: It adds ore e&&iciency than to write data directy into a strea <o: ita/es the 'er&orance &ast?
A) Bu&&ered2ut'ut<treaB) ByteArray2ut'ut<treaC) Bu&&eredIn'ut<treaD) ByteArrayIn'ut<trea!iew Answer " #ide Answer
ANSWER: A) Buered"ututStream
6) which casses does <un icrosyste has su((ested not to use the: i& you have to read and write thetextua in&oration?
A) Bu&&eredIn'ut<trea and Bu&&ered2ut'ut<treaB) <equenceIn'ut<trea and <equence2ut'ut<treaC) FieIn'ut<trea and Fie2ut'ut<treaD) Both A * B!iew Answer " #ide Answer
19) The CharArray%riter cass is not used to write data to uti'e &ies?
A) TrueB) Fase!iew Answer " #ide Answer
![Page 30: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/30.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 30/70
ANSWER: B) ,al*e
11) %hich are the ways to read data &ro the /eyboard?
A) In'ut<treaKeader B) ConsoeC) <canner D) DataIn'ut<treaM) A entioned above!iew Answer " #ide Answer
ANSWER: E) All 3entioned above
1$) %hich cass can be used to read data ine by ine by readine;) ethod?
A) Bu&&eredKeader B) In'ut<treaKeader C) DataIn'ut<treaD) +one o& the above!iew Answer " #ide Answer
ANSWER: A) BueredReader
1,) %hich is used to converts the byteoriented strea into characteroriented strea?
A) ConsoeB) <canner C) In'ut<treaKeader D) DataIn'ut<trea!iew Answer " #ide Answer
ANSWER: C) nutStreamReader
1-) These &our ethods are coony used in?'ubic charGH readPassword;<trin( &t:2b0ect ar(s)'ubic <trin( readine;)
![Page 31: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/31.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 31/70
'ubic <trin( readine;<trin( &t:2b0ect ar(s)'ubic charGH readPassword;
A) <canner CassB) Consoe cassC) In'ut<treaKeader cassD) DataIn'ut<trea!iew Answer " #ide Answer
ANSWER: B) Con*ole (la**
1.) %hich cass brea/s the in'ut into to/ens usin( a deiiter which is whites'ace byde&aut: It 'rovidesany ethods to read and 'arse various 'riitive vaues?
A) Consoe cassB) <canner cassC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: B) S(anner (la**
13) %hich cass autoaticay &ushes the data so there is no need to ca &ush;) ethod oreover: itsethods donRt throw I2Mxce'tion?
A) Consoe cassB) <canner CassC) FieIn'ut<trea cassD) Print<trea cass!iew Answer " #ide Answer
ANSWER: D) PrintStream (la**
14) The Print<trea cass 'rovides ethods to?
A) read data to another streaB) %rite data to another streaC) read data to sae streaD) write data to sae strea!iew Answer " #ide Answer
![Page 32: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/32.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 32/70
15) %hich cass is used to unco'ress the & ie in the de&ate co'ression &orat: It 'rovides &aciity to theother unco'ression &iters?
A) De&ater2ut'ut<trea cassB) In&aterIn'ut<trea cassC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: B) nlaternutStream (la**
16) The Pi'edIn'ut<trea and Pi'ed2ut'ut<trea casses can be used to read and write datasiutaneousy?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
$9) %hich are subcasses o& FiterIn'ut<trea and Fiter2ut'ut<trea?
A) Pi'edIn'ut<treaB) Pi'ed2ut'ut<treaC) DataIn'ut<treaD) Data2ut'ut<treaM) Both C * D!iew Answer " #ide Answer
ANSWER: E) Both C & D
$1) To achieve 'er&orance: the DataIn'ut<trea cass coes with soe s'ecia ethods i/e?
A) %riteDoube;)B) %riteInt;)C) %riteBytes;)D) +one o& the above!iew Answer " #ide Answer
![Page 33: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/33.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 33/70
ANSWER: D) None o the above
$$) %hich ethod o& DataIn'ut<trea cass reads a ine &ro the &ie and returns it as a strin( ?
A) %riteInt;)B) readine;)C) readInt;)D) writeDoube;)!iew Answer " #ide Answer
ANSWER: B) readine')
$,) The strea to/eniNer cass can reco(niNe identi&iers: nubers: quoted strin(s: and various coentstyes?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
$-) The 0avaio<treaTo/eniNernextTo/en;) ethod 'arses the next to/en &ro the?
A) in'ut strea o& this to/eniNerB) out'ut strea o& this to/eniNer C) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: A) inut *tream o thi* to+eni9er
$.) Brea/in( a strin( or strea into eanin(&u inde'endent words is /nown as to/eniNation
A) True
![Page 34: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/34.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 34/70
B) Fase!iew Answer " #ide Answer
ANSWER: A) True
$3) %hich 'ac/a(e incudes <trin(To/eniNer which to/eniNes a strin( into inde'endent words?
A) 0avaawtB) 0avaa''etC) 0avautiD) 0avaan(!iew Answer " #ide Answer
ANSWER: C) .ava1util
$4) In which &ied o& <treaTo/eniNer i& the to/en is a word: this &ied contains the word that can be usedin 'ro(rain(?
A) <trin( svaB) doube nvaC) int tty'eD) static &ina int TT%2KD!iew Answer " #ide Answer
ANSWER: B) double nval
$5) <treaTo/eniNation has &oowin( 'ro(ras they are?
A) To/eniNin( text &ie contentsB) Printin( &ie contentsC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: C) Both A & B
![Page 35: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/35.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 35/70
$6) Java a''ication uses an out'ut strea to read data &ro a source: it ay be a &ie: an array:'eri'hera device or soc/et?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: B) ,al*e
,9) Both In'ut<trea and 2ut'ut<trea cass is an abstract cass It is the su'ercass o& a cassesre'resentin( an out'ut strea o& bytes
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
<ervets Advanced Java
1) In which advanta(e o& servet: <ervets are ana(ed by J! so no need to worry about eory ea/:(arba(e coection etc?
A) Better 'er&oranceB) PortabiityC) KobustD) <ecure!iew Answer " #ide Answer
ANSWER: C) Robu*t
$) In the &oowin( stateents identi&y the disadvanta(es o& C>I?
A) I& nuber o& cients increases: it ta/es ore tie &or sendin( res'onseB) For each request: it starts a 'rocess and %eb server is iited to start 'rocessesC) It uses 'at&or de'endent an(ua(e e( C: C88: 'erD) A entioned above!iew Answer " #ide Answer
![Page 36: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/36.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 36/70
ANSWER: D) All mentioned above
,) <ervet technoo(y is used to create web a''ication?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
-) In #TTP Kequest %hich As/s &or the oo'bac/ o& the request essa(e: &or testin( or troubeshootin(?
A) PSTB) 2PTI2+<C) DMMTMD) TKACM!iew Answer " #ide Answer
ANSWER: D) TRACE
.) In #TTP Kequest ethod >et request is secured because data is ex'osed in SK bar?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: B) ,al*e
3) In the #TTP Kequest ethod which is nonide'otent?
A) >MTB) P2<TC) B2T# A * BD) +one o& the above!iew Answer " #ide Answer
![Page 37: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/37.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 37/70
ANSWER: B) P"ST
4) >ive the exa'es o& A''ication <erver &ro the &oowin(?
A) A'acheB) TocatC) JBossD) %ebo(icM) Both C * D!iew Answer " #ide Answer
ANSWER: E) Both C & D
5) Abbreviate the ter IM?
A) utieve internet ai MxtensionB) uti'ur'ose internet ai MxtensionC) utiuse in&oration ai MxtensionD) +one o& the above!iew Answer " #ide Answer
ANSWER: B) 3ultiuro*e internet 3ail E5ten*ion
6) %hich 'ac/a(es re'resent inter&aces and casses &or servet API?
A) 0avaxservetB) 0avaxservethtt'C) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: C) Both A & B
19) The web container aintains the i&e cyce o& a servet instance:(ive the i&ecyce o& a servet?
A) <ervet cass is oaded
![Page 38: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/38.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 38/70
B) <ervet instance is createdC) init:<ervice:destroy ethod is invo/edD) A entioned above!iew Answer " #ide Answer
ANSWER: D) All mentioned above
11) The sendKedirect;) ethod o& #tt'<ervetKes'onse inter&ace can be used to redirect res'onse toanother resource: it ay be servet: 0s' or ht &ie?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
1$) In KequestDis'acher which ethod is used to sends the sae request and res'onse ob0ects toanother servet?
A) &orward;)B) sendKedirect;)C) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: A) or$ard')
1,) An ob0ect o& %hich is created by the web container at tie o& de'oyin( the 'ro0ect?
A) <ervetCon&i(B) <ervetContextC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: B) ServletConte5t
![Page 39: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/39.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 39/70
1-) An attribute in servet is an ob0ect that can be set: (et or reoved &ro one o& the &oowin( sco'es?
A) session sco'eB) request sco'eC) a''ication sco'eD) A entioned above!iew Answer " #ide Answer
ANSWER: D) All mentioned above
1.) #ow any techniques are used in <ession Trac/in(?
A) -B) ,C) $D) .!iew Answer " #ide Answer
ANSWER: A) 4
13) %hich coo/ie it is vaid &or sin(e session onyE it is reoved each tie when user coses the browser?
A) Persistent coo/ieB) +on'ersistent coo/ieC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: B) Non-er*i*tent (oo+ie
14) %hich ob0ect o& #tt'<ession can be used to view and ani'uate in&oration about a session: suchas the?
A) session identi&ier B) creation tieC) ast accessed tieD) A entioned above!iew Answer " #ide Answer
![Page 40: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/40.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 40/70
ANSWER: D) All mentioned above
15) %hich ethods are used to bind the ob0ects on #tt'<ession instance and (et the ob0ects?
A) setAttributeB) (etAttributeC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: C) Both A & B
16) %hich cass 'rovides strea to read binary data such as ia(e etc &ro the request ob0ect?
A) <ervtIn'ut<treaB) <ervet2ut'ut<treaC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: A) ServltnutStream
$9) These ethods do>et;):doPost;):do#ead:doDeete;):deTrace;) are used in?
A) >enereic <ervetsB) #tt'<ervetsC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: B) ;ttServlet*
$1) <essions is a 'art o& the <essionTrac/in( and it is &or aintainin( the cient state at server side?
![Page 41: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/41.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 41/70
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
$$) In <ession trac/in( which ethod is used in a bit o& in&oration that is sent by a web server to abrowser and which can ater be read bac/ &ro that browser?
A) #tt'<essionB) SK rewritin(C) Coo/iesD) #idden &or &ieds!iew Answer " #ide Answer
ANSWER: C) Coo+ie*
$,) Ssin( ai API we cannot send ai &ro a servet?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: B) ,al*e
$-) <ervets hande uti'e siutaneous requests by usin( threads?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
$.) %hich ty'e o& <ervetMn(ine is a server that incudes buitin su''ort &or servets?
![Page 42: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/42.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 42/70
A) Addon <ervetMn(ineB) Mbedded <ervetMn(ineC) <tandaone <ervetMn(ineD) +one o& the above!iew Answer " #ide Answer
ANSWER: C) Standalone ServletEn#ine
$3) Connection Pooin( Cass ana(es no o& user requests &or connections to i'rove the 'er&orance?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
$4) %hich o& these ways used to counicate &ro an a''et to servet?
A) KI CounicationB) #TTP CounicationC) <oc/et CounicationD) A entioned above!iew Answer " #ide Answer
ANSWER: D) All mentioned above
$5) %eb server is used &or oadin( the init;) ethod o& servet?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
$6) %hich cass can hande any ty'e o& request so it is 'rotocoinde'endent?
![Page 43: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/43.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 43/70
A) >eneric<ervetB) #tt'<ervetC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: A) 8eneri(Servlet
,9) In <ervet Terinoo(y what 'rovides runtie environent &or JavaMM ;0$ee) a''ications It 'er&orsany o'erations that are (iven beow@
1 i&e Cyce ana(eent$ utithreaded su''ort, 2b0ect Pooin(- <ecurity etc
A) <erver B) %ebserver C) Container D) A''ication <erver !iew Answer " #ide Answer
ANSWER: C) Container
Java Database Connectivity
1) The JDBC API is used to invo/e <= coands directy?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
$) %hy do you need the JDBC API?
A) 2DBC is not a''ro'riate &or direct use &ro the Java 'ro(rain( an(ua(e because it uses a Cinter&aceB) A itera transation o& the 2DBC C API into a Java API woud not be desirabeC) 2DBC is hard to earn
![Page 44: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/44.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 44/70
D) A entioned above!iew Answer " #ide Answer
ANSWER: D) All mentioned above
,) Abbreviate &or the ter SDA?
A) Sni&ied Data AccessB) Sniversa Data AccessC) Sniversa Di(ita AccessD) Sni&or Data Access!iew Answer " #ide Answer
ANSWER: B) <niver*al Data A((e**
-) A JDBC technoo(ybased driver ;JDBC driver) a/es it 'ossibe to do?
A) Mstabish a connection with a data sourceB) <end queries and u'date stateents to the data sourceC) Process the resutsD) A entioned above!iew Answer " #ide Answer
ANSWER: D) All mentioned above
.) %hich was &irst ost widey used 'ro(rain( inter&ace &or accessin( reationa databases: It o&&ersthe abiity to connect to aost a databases on aost a 'at&ors?
A) JDBC APIB) 2DBC APIC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: B) "DBC AP
![Page 45: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/45.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 45/70
3) icroso&t has introduced SDA as an ubrea ter that covers?
A) 2M DBB) AD2C) KD<D) 2DBCM) A entioned above!iew Answer " #ide Answer
ANSWER: E) All mentioned above
4) %hich odes does JDBC API su''orts &or database access?
A) Twotier odesB) Threetier odesC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: C) Both A & B
5) In which ode a Java a''et or a''ication ta/s directy to the data source?
A) Twotier odesB) Threetier odesC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: A) T$o-tier model*
6) The JDBC API is what aows access to a data source &ro a Java idde tier?
A) TrueB) Fase!iew Answer " #ide Answer
![Page 46: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/46.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 46/70
ANSWER: A) True
19) In which o& the &oowin( JDBC a server technoo(y are its su''ort &or?
A) Connection 'ooin(B) Distributed transactionsC) Disconnected rowsetsD) A entioned above!iew Answer " #ide Answer
ANSWER: D) All mentioned above
11) #ow any JDBC 'roduct co'onents does the Java so&tware 'rovides?
A) ,B) $C) -D) .!iew Answer " #ide Answer
ANSWER: A) 0
1$) In the &oowin( which JDBC 'roduct co'onents does the Java so&tware 'rovides?
A) the JDBC driver ana(er B) the JDBC driver test suiteC) the JDBC2DBC brid(eD) A entioned above!iew Answer " #ide Answer
ANSWER: D) All mentioned above
1,) %hich cass has traditionay been the bac/bone o& the JDBC architecture?
A) the JDBC driver ana(er B) the JDBC driver test suite
![Page 47: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/47.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 47/70
C) the JDBC2DBC brid(eD) A entioned above!iew Answer " #ide Answer
ANSWER: A) the !DBC driver mana#er
1-) %hich 'rovides soe con&idence that JDBC drivers wi run your 'ro(ra?
A) the JDBC2DBC brid(eB) the JDBC driver ana(er C) the JDBC driver test suiteD) +one o& the above!iew Answer " #ide Answer
ANSWER: C) the !DBC driver te*t *uite
1.) JDBC technoo(ybased drivers (eneray &it into how any cate(ories?
A) -B) ,C) $D) .!iew Answer " #ide Answer
ANSWER: A) 4
13) %hich /ind o& driver converts JDBC cas into cas on the cient API &or 2race: <ybase: In&orix: IBDB$: or other DB<?
A) JDBC2DBC brid(e 'us 2DBC driver B) +ativeAPI 'artyJava driver C) JDBC+et 'ure Java driver D) +ative'rotoco 'ure Java driver !iew Answer " #ide Answer
ANSWER: B) Native-AP artl/-!ava driver
![Page 48: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/48.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 48/70
14) In which driver +etwor/ connection is indirect that a JDBC cient a/es to a iddeware 'rocess thatacts as a brid(e to the DB< server?
A) JDBC+etB) JDBC2DBC brid(eC) +ative API as basisD) +ative 'rotoco as basis!iew Answer " #ide Answer
ANSWER: A) !DBC-Net
15) A eadin( database connectivity vendor: wor/ed to(ether to 'roduce the?
A) JDBC2DBC Brid(eB) JDBC Driver Test <uiteC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: C) Both A & B
16) %hich ist (ives a quic/ way to deterine which Connection ethod is a''ro'riate &or creatin(di&&erent ty'es o& <= stateents?
A) create<tateentB) Pre'are<tateentC) 're'areCaD) A entioned above!iew Answer " #ide Answer
ANSWER: D) All mentioned above
$9) %hich ethod is used &or an <= stateent that is executed &requenty?
A) 're'are<tateentB) 're'areCaC) create<tateent
![Page 49: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/49.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 49/70
D) +one o& the above!iew Answer " #ide Answer
ANSWER: A) reareStatement
$1) The Kesut<etnext ethod is used to ove to the next row o& the Kesut<et: a/in( it the currentrow?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
$$) #ow any Kesut sets avaiabe with the JDBC $9 core API: The &oowin( constants: de&ined in theKesut<et inter&ace: are used to s'eci&y these?
A) $B) ,C) -D) .!iew Answer " #ide Answer
ANSWER: B) 0
$,) In which the resut set (eneray does not show chan(es to the underyin( database that are adewhie it is o'en The ebershi': order: and coun vaues o& rows are ty'icay &ixed when the resut setis created?
A) TOPMF2K%AKD2+OB) TOPM<CK2I+<M+<ITI!MC) TOPM<CK2<M+<ITI!MD) A M+TI2+MD AB2!M!iew Answer " #ide Answer
ANSWER: B) T=PE>SCR">NSENST?E
![Page 50: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/50.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 50/70
$-) In concurrency which Indicates a resut set that cannot be u'dated 'ro(raaticay?
A) C2+CSKSPDATABMB) C2+CSKKMAD2+OC) B2T# A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: B) C"NC<R>READ>"N=
$.) %hich ethods returns a strea that si'y 'rovides the raw bytes &ro the database without anyconversion?
A) (etCharacter<treaB) (etBinary<treaC) (etAscii<treaD) (etSnicode<trea!iew Answer " #ide Answer
ANSWER: B) #etBinar/Stream
$3) %hich ethod is used &or retrievin( streas o& both A<CII and Snicode characters is new in theJDBC $9 core API?
A) (etCharacter<treaB) (etBinary<treaC) (etAscii<treaD) (etSnicode<trea!iew Answer " #ide Answer
ANSWER: A) #etChara(terStream
$4) Drivers that are JDBC Co'iant shoud noray su''ort scroabe resut sets: but they are notrequired to do so?
A) TrueB) Fase!iew Answer " #ide Answer
![Page 51: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/51.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 51/70
ANSWER: A) True
$5) The intent is &or JDBC drivers to i'eent nonscroabe resut sets usin( the su''ort 'rovided bythe underyin( database systes?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: B) ,al*e
$6) In order to trans&er data between a database and an a''ication written in the Java 'ro(rain(an(ua(e: the JDBC API 'rovides which o& these ethods?
A) ethods on the Kesut<et cass &or retrievin( <= <MMCT resuts as Java ty'esB) ethods on the Pre'ared<tateent cass &or sendin( Java ty'es as <= stateent 'araetersC) ethods on the Caabe<tateent cass &or retrievin( <= 2ST 'araeters as Java ty'esD) A entioned above!iew Answer " #ide Answer
ANSWER: D) All mentioned above
,9) The JDBC ty'es BI+AKO: !AKBI+AKO: and 2+>!AKBI+AKO are cosey reated in that!AKBI+AKO re'resents a?
A) a sa variabeen(th binary vaueB) a sa &ixeden(th binary vaueC) a ar(e variabeen(th binary vaueD) Both A * B!iew Answer " #ide Answer
ANSWER: A) a *mall variable-len#th binar/ value
,1) In which the JDBC ty'e re'resents a 3-bit si(ned inte(er vaue between 6$$,,4$9,35.-44.595
![Page 52: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/52.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 52/70
and 6$$,,4$9,35.-44.594?
A) <AI+TB) BI>I+TC) TI+OI+TD) I+TM>MK!iew Answer " #ide Answer
ANSWER: B) B8NT
,$) In which the JDBC ty'e re'resents a sin(e 'recision &oatin( 'oint nuber that su''orts sevendi(its o& antissa?
A) KMAB) D2SBMC) F2ATD) I+TM>MK!iew Answer " #ide Answer
ANSWER: A) REA
,,) In %hich ty'e ay o'tionay have a custo a''in( to a cass in the Java 'ro(rain( an(ua(e:Acusto a''in( consists o& a cass that i'eents the inter&ace <=Data and an entry in a
0avautia' ob0ect?
A) AKKAOB) C2BC) DI<TI+CTD) B2B!iew Answer " #ide Answer
ANSWER: C) DSTNCT
,-) The JDBC API has aways su''orted 'ersistent stora(e o& ob0ects de&ined in the Java 'ro(rain(an(ua(e throu(h the ethods (et2b0ect and set2b0ect?
A) TrueB) Fase!iew Answer " #ide Answer
![Page 53: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/53.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 53/70
ANSWER: A) True
,.) In Advanced JDBC Data ty'es which have de&ined new data ty'es that are coony re&erred to as<=, ty'es?
A) I<2; Internationa 2r(aniNation &or <tandardiNation)B) IMC; the Internationa Mectrotechnica Coission)C) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: C) Both A & B
%or/in( with ty'es@ %ra''er casses Java
1) The wra''er casses are 'art o& the which 'ac/a(e: that is i'orted by de&aut into a Java 'ro(ras?
A) 0avaan(B) 0avaawtC) 0avaioD) 0avauti!iew Answer " #ide Answer
ANSWER: A) .ava1lan#
$) %hich de&ines a ethod caed nextMeent that is used to (et the next eeent in a data structure thatcontains uti'e eeents?
A) BitsetB) !ector C) <tac/D) Mnueration!iew Answer " #ide Answer
ANSWER: D) Enumeration
,) %hich de&ines the ethods by which you can enuerate ;obtain one at a tie) the eeents in a
![Page 54: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/54.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 54/70
coection o& ob0ects?
A) <tac/ cassB) Bitset cassC) Mnueration inter&aceD) +one o& the above!iew Answer " #ide Answer
ANSWER: C) Enumeration intera(e
-) %hich s'eci&ies the &oowin( two ethods ?booean hasoreMeents;)2b0ect nextMeent;)
A) MnuerationB) BitsetC) !ector D) <tac/!iew Answer " #ide Answer
ANSWER: A) Enumeration
.) %hich ethod Keturns an enueration o& the vaues contained in the dictionary?
A) Mnueration eeents;)B) Mnueration /eys;)C) Mnueration 'ro'erty+aes;)D) +one o& the above!iew Answer " #ide Answer
ANSWER: A) Enumeration element*')
3) %hich ethod Keturns an enueration o& the /eys: This incudes those /eys &ound in the de&aut'ro'erty ist: too?
A) Mnueration /eys;)B) Mnueration eeents;)C) Mnueration 'ro'erty+aes;)D) Both A * B!iew Answer " #ide Answer
![Page 55: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/55.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 55/70
ANSWER: C) Enumeration roert/Name*')
4) <trin(To/eniNer i'eents the Mnueration inter&ace?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
5) %hich 'ac/a(e does 0ava 'rovides in which it acts as an ob0ect oriented wra''er around ostcoon databases?
A) JDBCB) 2DBCC) +one o& the above!iew Answer " #ide Answer
ANSWER: A) !DBC
6) Fitered streas are si'y wra''ers around underyin( in'ut or out'ut streas that trans'arenty'rovide soe extended eve o& &unctionaity?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
19) %ra''er casses are not used to convert any data ty'e into an ob0ect?
A) TrueB) Fase!iew Answer " #ide Answer
![Page 56: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/56.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 56/70
ANSWER: B) ,al*e
11) !oid it is not a wra''er cass?
A) TrueB) Fase!iew Answer " #ide Answer
ANSWER: A) True
1$) The 'riitive data ty'e vaues wi be stored in ?
A) #ea' eoryB) <tac/ eoryC) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: B) Sta(+ 3emor/
1,) %hich can be used as raw data &or o'erations such as arithetic: o(ica: etc?
A) Priitive data ty'esB) %ra''er casses!iew Answer " #ide Answer
ANSWER: A) Primitive data t/e*
1-) The &oowin( two stateents iustrate the di&&erence between a
int x $.EInte(er y new Inte(er;,,)E
A) Priitive data ty'es
![Page 57: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/57.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 57/70
B) 'riitive data ty'e and an ob0ect o& a wra''er cassC) %ra''er cassD) +one o& the above!iew Answer " #ide Answer
ANSWER: B) rimitive data t/e and an ob.e(t o a $raer (la**
1.) %hich aow the caer to reove eeents &ro the underyin( coection durin( the iteration with wede&ined seantics?
A) MnuerationB) Iterator C) +one o& the above!iew Answer " #ide Answer
ANSWER: B) terator
13) %hich ethod %hen i'eented: it ust return true whie there are sti ore eeents to extract:and &ase when a the eeents have been enuerated?
A) 2b0ect nextMeent; )B) booean hasoreMeents; )C) Both A * BD) +one o& the above!iew Answer " #ide Answer
ANSWER: B) boolean ha*3oreElement*' )
JDBC
The !DBC-"DBC Brid#e *uort* multile (on(urrent oen *tatement* er (onne(tion@
"tion*
True
Fase
C2KKMCT A+<%MK @ Fase
![Page 58: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/58.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 58/70
Whi(h o the ollo$in# allo$* non reeatable read in !DBC Conne(tion@
"tion*
TKA+<ACTI2+KMADS+C2ITTMD
TKA+<ACTI2+KMADC2ITTMD
TKA+<ACTI2+<MKIAIUABM TKA+<ACTI2+KMPMATABMKMAD
C2KKMCT A+<%MK @ TKA+<ACTI2+KMPMATABMKMAD
Whi(h o the ollo$in# *tatement* i* al*e a* ar a* dierent t/e o *tatement* i* (on(ern in
!DBC@
"tion*
Ke(uar <tateent
Pre'ared <tateent
Caabe <tateent Interi <tateent
C2KKMCT A+<%MK @ Interi <tateent
Whi(h o the ollo$in# method* are needed or loadin# a databa*e driver in !DBC@
"tion*
re(isterDriver;) ethod
Cass&or+ae;)
Both A and B
(etConnection;)
C2KKMCT A+<%MK @ Both A and B
Whi(h o the ollo$in# i* al*e a* ar a* t/e 4 driver i* (on(ern@
"tion*
Ty'e - driver is Vnative 'rotoco: 'ure 0avaW driver
Ty'e - drivers are 199X Java co'atibe
Ty'e - drivers uses <oc/et cass to connect to the database
Ty'e - drivers can not be used with +etsca'e
C2KKMCT A+<%MK @ Ty'e - drivers can not be used with +etsca'e
To e5e(ute a *tored ro(edure totalSto(+ in a databa*e *erver $hi(h o the ollo$in# (ode
*niet i* u*ed@
"tion*
<tateent stt connectioncreate<tateent;)E sttexecute;tota<toc/;))E
![Page 59: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/59.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 59/70
Caabe<tateent cbstnt con're'areCa;ca tota<toc/L)E csexecute=uery;)E
<toreProcedure<tateent s'stt connectioncreate<toreProcedure;tota<toc/;))E
s'sttexecute=uery;)E
Pre'are<tateent 'stt connection're'are<tateent;tota<toc/;))E 'sttexecute;)E
C2KKMCT A+<%MK @ Caabe<tateent cbstnt con're'areCa;ca tota<toc/L)Ecsexecute=uery;)E
Whi(h driver i* ei(ient and al$a/* reerable or u*in# !DBC ali(ation*@
"tion*
Ty'e Y -
Ty'e Y 1
Ty'e Y ,
Ty'e Y $
C2KKMCT A+<%MK @ Ty'e Y -
!DBC a(ilitate* to *tore the .ava ob.e(t* b/ u*in# $hi(h o the method* o PrearedStatement 71
*et"b.e(t ') 1 *etBlob') 01 *etClob')
"tion*
1: $
1:$:,
1:,
$:,
C2KKMCT A+<%MK @ 1:$:,
Whi(h *tatement i* *tati( and */n(hroni9ed in !DBC AP@
"tion*
execute=uery;)
executeS'date;)
(etConnection;)
're'areCa;)
C2KKMCT A+<%MK @ (etConnection;)
The !DBC-"DBC brid#e i*
"tion*
Three tiered
utithreaded
Best &or any 'at&or
A o& the above
![Page 60: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/60.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 60/70
C2KKMCT A+<%MK @ utithreaded
All ra$ data t/e* 'in(ludin# binar/ do(ument* or ima#e*) *hould be read and uloaded to the
databa*e a* an arra/ o
"tion*
byte
int
booean
char
C2KKMCT A+<%MK @ byte
The (la** .ava1*6l1Time*tam ha* it* *uer (la** a*
"tion* 0avasqTie
0avautiDate
0avautiTie
+one o& the above
C2KKMCT A+<%MK @ 0avautiDate
B"B C"B ARRA= and RE, t/e (olumn* (an be udated in
"tion*
JDBC 19 JDBC -9
JDBC $9
JDBC ,9
C2KKMCT A+<%MK @ JDBC ,9
Whi(h o the ollo$in# method* ind* the ma5imum number o (onne(tion* that a *e(ii( driver
(an obtain@
"tion*
Database(etaxConnections Connection(etaxConnections
DatabaseetaData(etaxConnections
Kesut<etetaData(etaxConnections
C2KKMCT A+<%MK @ DatabaseetaData(etaxConnections
Are reared *tatement* a(tuall/ (omiled@
![Page 61: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/61.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 61/70
"tion*
Oes: they co'ied
+o: they are bound by the JDBC driver
C2KKMCT A+<%MK @ Oes: they co'ied
When the me**a#e No Suitable Driver o((ur*@
"tion*
%hen the driver is not re(istered by Cass&ornae;) ethod
%hen the user nae: 'assword and the database does not atch
%hen the JDBC database SK 'assed is not constructed 'ro'ery
%hen the ty'e - driver is used
C2KKMCT A+<%MK @ %hen the JDBC database SK 'assed is not constructed 'ro'ery
Whi(h driver i* (alled a* thin-driver in !DBC@
"tion*
Ty'e- driver
Ty'e1 driver
Ty'e, driver
Ty'e$ driver
C2KKMCT A+<%MK @ Ty'e- driver
;o$ man/ tran*a(tion i*olation level* are deined in .ava1*6l1Conne(tion intera(e@
"tion*
-
,
.
$
C2KKMCT A+<%MK @ .
Whi(h method i* u*ed to erorm D3 *tatement* in !DBC@
"tion* execute;)
execute=uery;)
executeS'date;)
executeKesut;)
C2KKMCT A+<%MK @ executeS'date;)
![Page 62: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/62.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 62/70
What i* the di*advanta#e o T/e-4 Native-Proto(ol Driver@
"tion*
At cient side: a se'arate driver is needed &or each database
Ty'e- driver is entirey written in Java
The driver converts JDBC cas into vendors'eci&ic database 'rotoco It does not su''ort to read y<= data
C2KKMCT A+<%MK @ At cient side: a se'arate driver is needed &or each database
jQuery
Is jQuery a W3C standard?
A. No
B. Yes
Ans: B
Look at the follo!n" jQuery sele#tor: $%&d!'(!ntro .head)*. What does !t sele#t?
A. +he ,rst ele-ent !th !d)head) !ns!de any d!' ele-ent !th #lass)!ntro)
B. All ele-ents !th #lass)head) !ns!de the ,rst d!' ele-ent !th !d)!ntro)
C. All d!' ele-ents !th !d)!ntro) or #lass)head)
Ans:C
Wh!#h jQuery -ethod !s used to s!t#h /eteen add!n"0re-o'!n" one or -ore
#lasses %for C11* fro- sele#ted ele-ents?
A. to""leClass%*
B. s!t#h%*
C. altClass%*
D. s!t#hClass%*
Ans: D
Wh!#h jQuery -ethod should /e used to deal !th na-e #on2!#ts?
A. noNa-eCon2!#t%*
B. noCon2!#t%*
![Page 63: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/63.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 63/70
C. na-eCon2!#t%*
D. #on2!#t%*
Ans:D
Wh!#h jQuery fun#t!on !s used to re'ent #ode fro- runn!n"4 /efore the do#u-ent !s,n!shed load!n"?
A. $%do#u-ent*.load%*
B. $%do#u-ent*.ready%*
C. $%/ody*.onload%*
Ans:C
What s#r!t!n" lan"ua"e !s jQuery r!tten !n?
A. 5B1#r!t
B. Ja'a1#r!t
C. C(
D. C66
Ans: B
Wh!#h jQuery state-ent !s true?
A. +o use jQuery4 you -ust /uy the jQuery l!/rary at .j7uery.#o-
B. +o use jQuery4 you do not ha'e to do anyth!n". 8ost /rosers %Internet 9lorer4
Chro-e4 ;!refo and <era* ha'e the jQuery l!/rary /u!lt !n the /roser
C. +o use jQuery4 you #an refer to a hosted jQuery l!/rary at =oo"le
Ans: A
What !s the #orre#t jQuery #ode for -ak!n" all d!' ele-ents > !els h!"h?
A. $%&d!')*.he!"ht)>Z
B. $%&d!')*.he!"ht%>*
C. $%&d!')*.y@os%>*
Ans:C
Wh!#h jQuery -ethod !s used to erfor- an asyn#hronous ++@ re7uest?
![Page 64: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/64.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 64/70
A. jQuery.ajaAsyn#%*
B. jQuery.aja%*
C. jQuery.aja1etu%*
Ans:B
Wh!#h jQuery -ethod !s used to set one or -ore style roert!es for sele#ted
ele-ents?
A. #ss%*
B. ht-l%*
C. style%*
Ans:A
Wh!#h jQuery -ethod !s used to h!de sele#ted ele-ents?
A. h!dden%*
B. h!de%*
C. '!s!/le%false*
D. d!slay%none*
Ans:B
W!th jQuery4 look at the follo!n" sele#tor: $%&d!'.!ntro)*. What does !t sele#t?
A. +he ,rst d!' ele-ent !th #lass)!ntro)
B. +he ,rst d!' ele-ent !th !d)!ntro)
C. All d!' ele-ents !th #lass)!ntro)
D. All d!' ele-ents !th !d)!ntro)
Ans:C
What !s the #orre#t jQuery #ode to set the /a#k"round #olor of all ele-ents to red?
A. $%&)*.layout%&/a#k"round#olor)4)red)*
B. $%&)*.-an!ulate%&/a#k"round#olor)4)red)*
C. $%&)*.#ss%&/a#k"round#olor)4)red)*
D. $%&)*.style%&/a#k"round#olor)4)red)*
![Page 65: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/65.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 65/70
Ans:C
+he jQuery ht-l%* -ethod orks for /oth +8L and 8L do#u-ents
A. ;alse
B. +rue
Ans:A
Is !t oss!/le to use jQuery to"ether !th AJA?
A. No
B. Yes
Ans:B
Is jQuery a l!/rary for #l!ent s#r!t!n" or ser'er s#r!t!n"?
A. 1er'er s#r!t!n"
B. Cl!ent s#r!t!n"
Ans:A
W!th jQuery4 look at the follo!n" sele#tor: $%&d!')*. What does !t sele#t?
A. All d!' ele-ents
B. +he ,rst d!' ele-ent
Ans: A
Wh!#h s!"n does jQuery use as a short#ut for jQuery? E jQuery Quest!ons
@osted on No'e-/er >4 F>G /y sk!llsH
A. the s!"n
B. the ? 1!"n
C. the $ s!"n
Ans: C
![Page 66: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/66.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 66/70
jQuery uses C11 sele#tors to sele#t ele-ents?
A. ;alse
B. +rue
Ans:B
Wh!#h of the follo!n" !s #orre#t?
A. jQuery !s a Ja'a1#r!t L!/rary
B. jQuery !s a J1<N L!/rary
Ans: A
Wh!#h of the follo!n" !s #orre#t
A. jQuery !s a Ja'a1#r!t L!/rary
B. jQuery !s a J1<N L!/rary
Ans: A
JFee
1 A''ications in a !EE architecture
2 ;a) ust be created via a Java IDM2 ;b) can run on di&&erent achines: but ony with the sae 2'eratin( <yste2 ;c) are ty'icay based on <ervets: J<Ps and Mnter'rise Java Beans2 ;d) need no runtie environent
$ The E!B *e(ii(ation architecture does +2T de&ine
2 ;a) transactiona co'onents2 ;b) cient side security and encry'tion2 ;c) distributed ob0ect co'onents2 ;d) serverside co'onents
, %hat e5e(ute* E!B co'onents?
2 ;a) a web server
2 ;b) an MJB container 2 ;c) an a''ication server 2 ;d) a database server
- %hat ty'e o& enter'rise bean is used to ebody ali(ation ro(e**in# *tate in&oration?
2 ;a) 0avaxe0bMnter'riseBean2 ;b) 0avaxe0b<essionBean
![Page 67: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/67.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 67/70
2 ;c) 0avaxe0bessa(eBean2 ;d) 0avaxe0bMntityBean
. %hich inter&aces ust be i'eented by 3e**a#e driven bean*?;, correct answers)
GH GaH 0avaxe0bessa(eDrivenBeanGH GbH 0avaio<eriaiNabeGH GcH 0avaxenter'risede'oyodeJ$eeA''ication2b0ectGH GdH 0avax0sessa(eistener GH GeH 0avaxe0bMJBMxce'tion
1-"1$"$996 <e&test J$MM Mnter'rise Java Beans $x -
3 %hich describes best an E!B handle?
2 ;a) An MJB hande is used to hande exce'tions when accessin( MJB ob0ects2 ;b) An MJB hande is used to store a re&erence to a s'eci&ic MJB ob0ect2 ;c) An MJB hande is 'art o& the #oe inter&ace
2 ;d) An MJB hande is used &or oca re&erences inside the MJB container
4 %hen a deveo'er decares an E!B lo(al reeren(e: what eeent does +2T need to bes'eci&ied?
2 ;a) J+DI bindin( &or oca hoe inter&ace2 ;b) oca hoe inter&ace2 ;c) #oe inter&ace2 ;d) e0bre&ty'e
5 For a *tateul *e**ion bean: which ethod is activated by the container to save the state o& the bean?
2 ;a) e0bCreate;)2 ;b) e0bPassivate;)2 ;c) e0b<tore;)2 ;d) e0b<ave;)6 The MJB Se**ionConte5t can be used to (et in&oration about users cain( sessionenter'risebeans %hich in&oration can +2T be retrieved?
2 ;a) transactiona in&oration2 ;b) security in&oration2 ;c) data source in&oration
2 ;d) tier service in&oration
19 Cient 'ro(ras that access MJBs a/e use o& the Java +ain( and Directory Inter&ace;J+DI) To (et access to a Person entity bean: which ethods can be used?;$ correct answers)
Assue the &oowin( code is used to estabish the initia context@Properties props = System.getProperties();
Context ctx = new InitialContext(props);
![Page 68: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/68.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 68/70
GH GaH Person#oe 'h ctxoo/u';V0ava@co'"env"e0b"PersonW)EGH GbH Personoca#oe 'h ;Personoca#oe)ctxoo/u';V0ava@co'"env"e0b"Personoca#oeW)EGH GcH Person#oe 'h ctxoo/u';V0ava@co'"env"e0b"Person#oeW)EGH GdH Person#oe 'h 0avaxriPortabeKeote2b0ectnarrow;ctx: Person#oecass)GH GeH Person#oe 'h ;Person#oe)0avaxriPortabeKeote2b0ectnarrow;ctx:
Person#oecass)
11 %hich ethods shoud +2T be de&ined inside the hoe inter&ace o& a session bean?;$ correct answers)
GH GaH &ind ethodsGH GbH uti'e create;) ethodsGH GcH business ethodsGH GdH reove;) ethods
1$ The 'ersistence o& Person and Address in&oration in an a''ication is i'eented viaBP
entity beans Mach Person ust have exacty one Address I& a Person contains the 'riary/ey &or Address in a 'ersistent &ied: how shoud you i'eent the Person MJB ethods?;$ correct answers)
GH GaH The e0bKeove;) ethod o& Person invo/es the reove;) ethod o& AddressGH GbH The e0b<tore;) ethod o& Person invo/es the e0b<tore;) ethod o& AddressGH GcH The e0bPassivate;) ethod o& Person invo/es the e0bPassivate;) ethod o& AddressGH GdH The e0boad;) ethod o& Person invo/es the &indByPriaryey;) ethod o& Address#oeGH GeH The e0boad;) ethod o& Person invo/es the e0boad;) ethod o& Address
1, %hat woud be a ty'ica use o& e0b<eect;) ethods?
2 ;a) Ssin( e0b<eect;) ethods in session beans &or s'eci&yin( the seection criteria &or a ist2 ;b) Ssin( e0b<eect;) ethods within e0b#oe ethods to return entities2 ;c) Ssin( e0b<eect;) ethods to access &ieds o& a bean instance2 ;d) Ssin( e0b<eect;) ethods to 'er&or o'erations not s'eci&ic to a entity instance
1- Be&ore a essa(edriven bean ;DB) can be tested: the J$MM a''ication server has beeninstaed on a test achine and a connection &actory and destination have been con&i(ured &or the J< 'rovider %hat other con&i(uration tas/ S<T be co'eted be&ore the DB can betested on the test server?
2 ;a) The native ibrary directory in the cass'ath ust be s'eci&ied
2 ;b) A essa(e istener 'ort ust be de&ined2 ;c) The essa(e istener service ust be enabed2 ;d) A essa(e 'assivation directory ust be s'eci&ied
1. A course enroent a''ication needs to de&ine a JDBC resource re&erence &or a DB$databasein the de'oyent descri'tor Assuin( that the nae o& the resource re&erence is enroent:what is the a''ro'riate J+DI decaration?
![Page 69: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/69.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 69/70
2 ;a) 0ava@co'"env"0dbc"db$"enroent2 ;b) 0ava@co'"env"0dbc"enroent2 ;c) 0ava@co'"env"enroent2 ;d) 0ava@0dbc"env"db$"enroent
13 CP &ieds in MJB $x are de&ined via
2 ;a) static &ieds in the entity bean2 ;b) an abstract 'ersistence schea2 ;c) MJB =uery an(ua(e de&initions in the de'oyent descri'tor 2 ;d) the 'ersistencety'e attribute in the de'oyent descri'tor
14 In order to use Container ana(ed Keations ;CK) &ieds in CP entity beans: thedeveo'er ust
2 ;a) decare the CK eber &ieds and add e0breationshi' de&initions in the de'oyentdescri'tor 2 ;b) i'eent the (et"set ethods &or the CK &ieds and add e0breationshi' de&initions inthe de'oyent descri'tor
2 ;c) i'eent the e0boad;) and e0b<tore;) ethods and add e0breationshi' de&initions inthe de'oyent descri'tor 2 ;d) decare abstract (et"set ethods &or the CK &ied and add e0breationshi' de&initions inthe de'oyent descri'tor
15 The MJB =uery an(ua(e is used
2 ;a) to enhance the <=63 standard with additiona o'tions &or co'ex reationshi's2 ;b) instead o& the &indByPriaryey;) ethod: to de&ine aternative seection criteria2 ;c) to s'eci&y a concrete i'eentation &or the &ind and seect ethods o& CP entity beans2 ;d) &or accessin( Sser De&ined data ty'es and <tored Procedures in the database
16 Container ana(ed transactions are de&ined via transattributes in the de'oyentdescri'tor%hen a session bean dearcates the transaction and cas an Mntity Bean: what is the besttransactiona settin( &or the Mntity Bean?
2 ;a) <u''orts2 ;b) +ever 2 ;c) Kequired2 ;d) Kequires+ew
$9 %hen a 'ac/a(ed enter'rise a''ication ;MAK &ie) is de'oyed to the a''ication server:which
activities can be 'er&ored? ;$ correct answers)
GH GaH <'eci&y the Vcontext rootW &or each web a''icationGH GbH >enerate access beans &or any enter'rise beansGH GcH Assi(n aias naes to the attributes o& the Mntity beansGH GdH a' the Mntity beans attributes to the reationa database tabes
![Page 70: New Microsoft Office Word Document](https://reader030.fdocuments.us/reader030/viewer/2022020710/563dba4e550346aa9aa47c6c/html5/thumbnails/70.jpg)
7/18/2019 New Microsoft Office Word Document
http://slidepdf.com/reader/full/new-microsoft-office-word-document-5691d634d60ff 70/70
E?A<AT"N1#ere are the correct answers to a questions@1 c$ b, b- b. a b d3 b4 c5 c6 c19 b e11 a c1$ a d1, d
1- b1. b13 b14 d15 c16 c$9 a d