Advance Java MCQ 2
Advance Java MCQ 2
Unit 1
b. EventClass
c. ActionEvent
d. ItemEvent
Answer: a
4. Which of these events will be notified if scroll bar is
manipulated?
a. ActionEvent
b. ComponentEvent
c. AdjustmentEvent
d. WindowEvent
Answer:c
5. In Graphics class which method is used to draws a
rectangle with the specified width and height?
13. Through which tag you can define servlet context in weB.
xml?
A. config-param
B. context-param
C. init-param
D. config-init-param
E. Answer:B
Answer: A
Unit V
Answer: B
31. WAR modules that contain enterprise module require an
_____________deployment descriptor.
a. ejb-jar.xml
b. web-jar.xml
c. ejb.xml
d. sql-jar.xml
Answer:A
32. The container invokes the _____ _ methods on newly
constructed bean instances after completion of all
dependency injection and before first business method is
invoked on the enterprise bean.
a. @PostConstruct
b. @PreDestroy
c. @PreActivate
d. @PostPassivate
Answer: A
Answer: D
Unit VI
35. What is ORM.
A. Object Relation Map
B. Object Rate Mapping
C. Object Relational Mapping
D. Object Relational Mapper
Answer: C
Answer: C
38. What is the JPA equivalent of hibernate.cfg.xml file.
A. configuration.xml
B. persistence.xml
C. jpA. configuration.xml
D. jpA. persistence.xml
Answer: B
39. Which tool automatically creates the required SQL
queries
A. XML
B. JPQL
C. ORM
D. JPA
Answer: C
40. Which one is the simple java class that represents a row
in a database table.
A. Attribute
B. Primary key
C. foreign key
D. Entity
Answer: D
41. Which annotation is used to link two tables through a
relation table?
A. @RelationTable
B. @JoinTable
C. @LinkTable
D.@GroupTable
Answer: B
42. Which method is used to remove a persistent instance
from the datastore.
A. Session.remove()
B. Session.delete()
C. Session.del()
E. Session.rm()