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.1Hard

An enterprise application needs different bean implementations based on environment (dev/prod). Which approach is most suitable?

Q.2Hard

What happens when a prototype-scoped bean has a dependency on a singleton-scoped bean in Spring?

Q.3Hard

In Spring Framework 2024-25, which feature allows lazy initialization of beans?

Q.4Hard

A microservices architecture uses Spring with circular dependency between ServiceA and ServiceB. What is the best solution?

Q.5Hard

How does Spring handle circular dependency between two beans?

Q.6Hard

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

Q.7Hard

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

Q.8Hard

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

Q.9Hard

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

Q.10Hard

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

Q.11Hard

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

Q.12Hard

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