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

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

Q.2Easy

What is the primary purpose of Dependency Injection (DI) in Spring Framework?

Q.3Easy

Which of the following is NOT a valid Spring bean scope in Spring 5.x+?

Q.4Easy

What does @Autowired annotation do in Spring?

Q.5Easy

Which XML element is used to define a bean in Spring XML configuration?

Q.6Easy

In Spring Framework, what is the primary purpose of the @Autowired annotation?

Q.7Easy

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

Q.8Easy

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

Q.9Easy

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

Q.10Easy

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

Q.11Easy

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

Q.12Easy

What is the primary purpose of the ApplicationContext in Spring Framework?

Q.13Easy

Which of the following is NOT a valid Spring Bean scope in Spring Framework 2024?

Q.14Easy

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

Q.15Easy

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