iGET

Java Programming - MCQ Practice Questions

Practice free Java Programming multiple-choice questions with detailed answers and explanations. Perfect for competitive exam preparation.

958 questions | 100% Free

Q.941Medium

What happens when @Lazy annotation is applied to a singleton bean in Spring?

Q.942Medium

Which annotation is used to provide external configuration properties to Spring beans in the 2024 Spring Boot version?

Q.943Hard

What is the primary difference between BeanFactory and ApplicationContext in Spring?

Q.944Hard

In a complex Spring application, when would you prefer to use ObjectFactory<T> over direct bean injection?

Q.945Medium

What is the significance of the @Qualifier annotation when used alongside @Autowired in Spring?

Q.946Hard

Consider a Spring application where you need different bean implementations based on the deployment environment. Which approach is most suitable?

Q.947Easy

What does the @Scope annotation with value 'prototype' mean in Spring Framework?

Q.948Medium

In Spring Framework 6.0, what is the role of the @EnableAutoConfiguration annotation in Spring Boot?

Q.949Medium

What is the purpose of using @Bean method parameters in Spring @Configuration classes?

Q.950Easy

Which of the following best describes the purpose of Spring's Stereotype annotations (@Service, @Repository)?

Q.951Hard

In a multi-threaded Spring application with singleton beans, what thread-safety consideration must be kept in mind?