

MCQOPTIONS
Saved Bookmarks
This section includes 177 Mcqs, each offering curated multiple-choice questions to sharpen your Technical Programming knowledge and support exam preparation. Choose a topic below to get started.
101. |
Alternative annotative way to specify precedence of aspects? |
A. | @Order |
B. | @Aspect |
C. | @PointCut |
D. | None of the mentioned |
Answer» B. @Aspect | |
102. |
Which interface is implemented to specify precedence of aspects? |
A. | Ordered |
B. | ApplicationAspect |
C. | AspectPointcut |
D. | None of the mentioned |
Answer» B. ApplicationAspect | |
103. |
An advice can access the current join point information by declaring an argument of type org.aspectj.lang.AdvicePoint in the advice method signature. |
A. | True |
B. | False |
Answer» C. | |
104. |
Which advice combines all advices into one? |
A. | @Before |
B. | @After |
C. | @AfterThrowing |
D. | None of the mentioned |
Answer» E. | |
105. |
Which advice is executed only when joint point returns or throws an exception? |
A. | @Before |
B. | @After |
C. | @AfterReturning |
D. | @AfterThrowing |
Answer» D. @AfterThrowing | |
106. |
Which advice is executed once a joint point finishes? |
A. | @Before |
B. | @After |
C. | @AfterReturning |
D. | @AfterThrowing |
Answer» C. @AfterReturning | |
107. |
An advice is an action which comes into play at pointcuts. |
A. | True |
B. | False |
Answer» C. | |
108. |
Which of the following is advice supported by Aspect Annotation? |
A. | @Before |
B. | @After |
C. | @AfterReturning |
D. | All of the mentioned |
Answer» E. | |
109. |
Which tag informs the spring container about the use of AspectJ annotation? |
A. | aop:aspectj-autowire |
B. | aop:aspectj-name |
C. | aop:aspectj-autoproxy |
D. | none of the mentioned |
Answer» D. none of the mentioned | |
110. |
Which of the following class’s instance is used by TimerTaskExecutor for managing jobs |
A. | java.util.Timer |
B. | java.util.Date |
C. | java.util.HashMap |
D. | none of the mentioned |
Answer» B. java.util.Date | |
111. |
The Quartz integration and message driven POJO container doesn’t needs TaskExecutor Services |
A. | True |
B. | False |
Answer» C. | |
112. |
Which method provided by ExecutorService is used to check whether job is finished or cancelled |
A. | Future.isDone() |
B. | Future.isCancelled() |
C. | None of the mentioned |
D. | All of the mentioned |
Answer» E. | |
113. |
Method provided by ExectuorService which returns a Future < T > |
A. | submit |
B. | publish |
C. | addService |
D. | registerService |
Answer» B. publish | |
114. |
Which subinterface provides functionality for managing Threads and their events |
A. | ExecutorService |
B. | ThreadService |
C. | All of the mentioned |
D. | None of the mentioned |
Answer» B. ThreadService | |
115. |
Which package is used for periodic work |
A. | java.lang.Thread |
B. | java.util.TimerTask |
C. | java.util.Timer |
D. | java.util.concurrent |
Answer» C. java.util.Timer | |
116. |
For a property editor to be searched correctly, it must be located in the same package as the target class, and the name must be Editor’s name |
A. | True |
B. | False |
Answer» C. | |
117. |
The property value is retrieved by:- |
A. | getValue method |
B. | setValue method |
C. | none of the mentioned |
D. | all of the mentioned |
Answer» E. | |
118. |
Method that converts string into a property value |
A. | getAsText |
B. | setAsText |
C. | regText |
D. | None of the mentioned |
Answer» C. regText | |
119. |
Method which converts property into a string value |
A. | getAsText |
B. | setAsText |
C. | regText |
D. | None of the mentioned |
Answer» B. setAsText | |
120. |
What are the ways to create custom Property Editors? |
A. | implement PropertyEditor interface |
B. | extend PropertyEditorSupport Class |
C. | none of the mentioned |
D. | all of the mentioned |
Answer» E. | |
121. |
Which of the following property editors are registered by Spring? |
A. | CustomNumberEditor |
B. | FileEditor |
C. | CustomDateEditor |
D. | CustomNetEditor |
Answer» C. CustomDateEditor | |
122. |
Which interface is used to create your own property editors? |
A. | CustomEditorConfigurer |
B. | RegisterCustomEditor |
C. | PropertyEditorConfigurer |
D. | None of the mentioned |
Answer» B. RegisterCustomEditor | |
123. |
Which property editor is used to specify a URL String for a property of the URL type? |
A. | java.net.* |
B. | java.io.* |
C. | java.net.URL |
D. | none of the mentioned |
Answer» D. none of the mentioned | |
124. |
Which of the following is used to convert property values to text Values? |
A. | property Editor |
B. | property setter |
C. | property getter |
D. | None of the mentioned. |
Answer» B. property setter | |
125. |
Which event is provoked when web request comes into action |
A. | ContextClosedEvent |
B. | ContextStoppedEvent |
C. | SessionEvent |
D. | RequestHandledEvent |
Answer» E. | |
126. |
Which of the following is a well known recognized event |
A. | ContextCloasedEvemt |
B. | ContextRefreshedEvent |
C. | RequestHandledEvent |
D. | All of the mentioned |
Answer» E. | |
127. |
Which method is used to publish your own custom event |
A. | contextPublish |
B. | publishEvent |
C. | applicationEventPublish |
D. | addEvent |
Answer» C. applicationEventPublish | |
128. |
Which interface is used to listen to certain events |
A. | ApplicationListener |
B. | ContextListener |
C. | EventListener |
D. | None of the mentioned |
Answer» B. ContextListener | |
129. |
Which interface defines methods for resolving text messages |
A. | MessageSource |
B. | ApplicationListener |
C. | ApplicationContextListener |
D. | TextEvent |
Answer» B. ApplicationListener | |
130. |
Which bean factory post processor externalizes part of the bean configurations into a properties file |
A. | PropertyPlaceholderConfigurer |
B. | PropertyPlaceholderRegister |
C. | PropertyGetPath |
D. | None of the mentioned |
Answer» B. PropertyPlaceholderRegister | |
131. |
PathCheckingBeanPostProcessor will not work properly in case of:- |
A. | XML Configuration |
B. | Java based Configuration |
C. | JSR Annotation |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
132. |
It’s possible to replace the original bean instance with a brand-new instance in your bean post processor |
A. | True |
B. | False |
Answer» B. False | |
133. |
Which method of bean post processors is used to check path existence |
A. | getPath |
B. | setPath |
C. | value |
D. | auto-wiring |
Answer» B. setPath | |
134. |
Which Interface for bean Post Processor is used to distinguish between checked beans |
A. | StorageConfig |
B. | Marker |
C. | None of the mentioned |
D. | All of the mentioned |
Answer» B. Marker | |
135. |
In application context, BeanPost Processors are registered using addBeanPostProcessors method |
A. | True |
B. | False |
Answer» C. | |
136. |
Which method is used to register BeanPostProcessor? |
A. | addBeanPostProcessors |
B. | registerBeanPostProcessors |
C. | addBeanProcessors |
D. | none of the mentioned |
Answer» B. registerBeanPostProcessors | |
137. |
Which method is used to gracefully shutdown all the bean processes after closing the spring container? |
A. | shutdownHook |
B. | destroy method |
C. | none of the mentioned |
D. | all of the mentioned |
Answer» B. destroy method | |
138. |
Method used to process bean after initialization callback |
A. | scope |
B. | getBean |
C. | postProcessAfterInitialization() |
D. | it’s own constructor |
Answer» D. it’s own constructor | |
139. |
Method used to process bean before initialization callback |
A. | scope |
B. | postProcessAfterInitialization() |
C. | postProcessBeforeInitialization() |
D. | it’s own constructor |
Answer» D. it’s own constructor | |
140. |
Which configuration can be used for Dependency Injection? |
A. | XML Configuration |
B. | Annotation Configuration |
C. | Java Based Configuration |
D. | All of the mentioned |
Answer» E. | |
141. |
Which annotation is used as a substitute of destroy method? |
A. | @PostConstruct |
B. | @PreDestroy |
C. | None of the mentioned |
D. | All of the mentioned |
Answer» C. None of the mentioned | |
142. |
Which annotation is used as a substitute of initialization method? |
A. | @PostConstruct |
B. | @PreDestroy |
C. | None of the mentioned |
D. | All of the mentioned |
Answer» B. @PreDestroy | |
143. |
Alternate way of destruction method is:- |
A. | init-method attribute |
B. | afterPropertiesSet |
C. | destroy-method attribute |
D. | none of the mentioned |
Answer» D. none of the mentioned | |
144. |
Alternate way of initialization method is:- |
A. | init-method attribute |
B. | afterPropertiesSet |
C. | destroy-method attribute |
D. | none of the mentioned |
Answer» B. afterPropertiesSet | |
145. |
Which interface is used to perform destruction of beans? |
A. | InitializingBean |
B. | Disposablebean |
C. | None of the mentioned |
D. | All of the mentioned |
Answer» C. None of the mentioned | |
146. |
Which interface is used to perform initialization of beans? |
A. | InitializingBean |
B. | Disposablebean |
C. | None of the mentioned |
D. | All of the mentioned |
Answer» B. Disposablebean | |
147. |
In above question if scope of shoppingCart named bean is prototype, then what will be the output? What will be the output? |
A. | Shopping cart 1 contains (AAA 2.5, CD-RW 1.5) Shopping cart 2 contains (AAA 2.5, CD-RW 1.5, DVD-RW 3.0) |
B. | Shopping cart 1 contains (AAA 2.5, CD-RW 1.5) Shopping cart 2 contains (DVD-RW 3.0) |
C. | BeanCreationException |
D. | None of the mentioned |
Answer» C. BeanCreationException | |
148. |
Which of the following are considered valid beans? |
A. | Singleton pattern |
B. | Prototype |
C. | All of the mentioned |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
149. |
Session Creates a single bean instance per HTTP request, only valid in the context of a web application? |
A. | true |
B. | False |
Answer» C. | |
150. |
Which scope creates a new bean instance each time when requested? |
A. | Singleton |
B. | Prototype |
C. | Session |
D. | Request |
Answer» C. Session | |