iGET

Java Programming - MCQ Practice Questions

Java interviews and campus tests lean heavily on object oriented behaviour rather than API recall. This set covers inheritance and polymorphism, interfaces and abstract classes, the collections framework, exception handling, multithreading, string handling, and JVM basics such as garbage collection. Output based questions are included because they expose the gaps that theory questions hide.

951 questions | 100% Free

Q.261Easy

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

Q.262Easy

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

Q.263Easy

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

Q.264Easy

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

Q.265Easy

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

Q.266Easy

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

Q.267Easy

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

Q.268Easy

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