7. Which interface is used to perform initialization of beans?
Correct Answer is : InitializingBean
8. Which interface is used to perform destruction of beans?
Correct Answer is : Disposablebean
9. Alternate way of initialization method is:-
Correct Answer is : init-method attribute
10. Alternate way of destruction method is:-
Correct Answer is : destroy-method attribute
11. Which annotation is used as a substitute of initialization method?
Correct Answer is : @PostConstruct
12. .Which annotation is used as a substitute of destroy method?
Correct Answer is : @PreDestroy
13. Which configuration can be used for Dependency Injection?
Correct Answer is : All of the mentioned
14. To validate Java beans in a web application using annotations.
Correct Answer is : All of the mentioned
15. JSR-303 or bean validation can access beans through annotations.
Correct Answer is : TRUE
16. For validating beans Spring supports.
Correct Answer is : all of the mentioned
17. JSR-303 can’t access java beans directly.
Correct Answer is : FALSE
18. Annotation which indicates a field cannot be a null.
Correct Answer is : @NotNull
19. Annotation used to indicate a field has to have a minimum of 2 characters.
Correct Answer is : @Size
20. Annotation which receives a value in the form regexp=”[email protected]+\\.[a-z]+”.
Correct Answer is : @Pattern
Similar Interview Questions
Search for latest jobs
Get $5 added to your wallet for registering an account. Refer others and get $1 for each successful referral. Earn while you search for jobs and redeem in gift cards!