Top 250+ Solved Advanced JAVA MCQ Questions Answer
Q. Which of the following is not an advantage of using Hibernate Query Language?
a. Database independent
b. Easy to write query
c. No need to learn SQL
d. Difficult to implement
Q. Which of the following is not an advantage of Hibernate Criteria API?
a. Allows to use aggregate functions
b. Cannot order the result set
c. Allows to fetch only selected columns of result
d. Can add conditions while fetching results
Q. What is the basic concept of Spring?
a. Factory pattern
b. Singleton pattern
c. Dependency injection or Inversion of control
d. Abstract factory pattern
Q. Which spring module provides the capability of DI or IOC?
a. Spring web
b. Core container
c. AOP
d. Data access
Q. What are beans in the concept of Spring or what are spring beans?
a. Controller classes
b. Service classes
c. Repository
d. Any class that is managed by the container.
Q. How does spring achieve DI or IOC?
a. Service locator pattern
b. Factory pattern
c. Abstract factory pattern
d. Singleton pattern
Q. Which interface in spring is responsible for Instantiating and managing the so calledSpring beans?
a. Bean Factory
b. ApplicationContext
c. BeanDefenition
d. BeanDefenition
Q. Beans can be created by which of the following properties?
a. Scope
b. Property
c. Class
d. It’s own constructor
Q. Which attribute is used to specify class name of the bean?
a. name
b. id
c. class
d. constructor-args
Q. Which of the following method can be used to used to instantiate a method?
a. static factory method
b. default-init method
c. destroy method
d. lazy-init method
Q. Which attribute is used to specify static factory-method?
a. factory-method
b. default-init method
c. destroy method
d. lazy-init method
Q. Purpose of Static Factory Method?
a. Static method to create an object
b. Initialize bean
c. All of the mentioned
d. None of the mentioned