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.21Medium

What is the difference between constructor injection and setter injection in Spring?

Q.22Medium

In Spring Framework, what does the @Autowired annotation do when autowiring candidates are ambiguous?

Q.23Medium

What is the difference between @Bean and @Component annotations in Spring?

Q.24Medium

Consider a scenario where a Spring application needs to initialize a database connection pool at startup. Which method should be used?

Q.25Medium

What is the role of Spring's PropertyPlaceholderConfigurer in application configuration?

Q.26Medium

In Spring Framework, which interface represents a factory pattern implementation for creating objects?

Q.27Medium

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

Q.28Medium

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

Q.29Medium

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

Q.30Medium

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

Q.31Medium

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