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.921Easy

Which of the following correctly describes the lifecycle of a singleton-scoped Spring bean?

Q.922Easy

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

Q.923Medium

In a Spring Boot application, what does the @SpringBootApplication annotation combine?

Q.924Medium

Consider a scenario where you have two bean implementations of the same interface. How would you specify which one to inject using Spring annotations?

Q.925Medium

What is the role of PropertySource annotation in Spring Framework?

Q.926Medium

In Spring Data JPA, what does the @Repository annotation signify?

Q.927Easy

What is the primary advantage of using Spring Dependency Injection over manual object creation?

Q.928Hard

How does Spring handle circular dependency between two beans?

Q.929Medium

What is the function of the BeanFactory interface in Spring?

Q.930Medium

In Spring AOP, what does the term 'Join Point' refer to?

Q.931Medium

What does the @Transactional annotation do in Spring?

Q.932Hard

An enterprise application requires different bean implementations based on runtime conditions. Which Spring feature is most suitable?

Q.933Medium

What is the significance of the @ConfigurationProperties annotation in Spring Boot?

Q.934Hard

Consider a Spring application where method execution time tracking is required across multiple methods. Which approach is most appropriate?

Q.935Easy

What is the default behavior of Spring when multiple beans of the same type are available for autowiring?

Q.936Hard

In Spring framework, what is the purpose of FactoryBean interface?

Q.937Medium

What does the @EnableCaching annotation enable in a Spring application?

Q.938Medium

When would you use request-scoped beans in a Spring web application?

Q.939Medium

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

Q.940Easy

Which annotation is used to mark a class as a Spring Bean in the latest Spring Framework 6.0?