Consider the following code:

@Component("objectComponent1") public class ObjectComponent1 implements ObjectComponent { public String format() { return "Hi"; } } @Component("objectComponent2") public class ObjectComponent2 implements ObjectComponent { public String format() { return "Hello"; } } @Component public class ObjectComponentService { @Autowired private ObjectComponent objComp; } 

What will happen if we try to load ObjectComponentService into a context?

objectComponent1 will be loaded

objectComponent2 will be loaded

NoUniqueBeanDefinitionException is thrown

Either objectComponent1 or objectComponent2 will be loaded

Correct Option - c

To get all Infosys Certified Cloud Native Developer Exam questions Join Group https://bit.ly/infy_premium_group

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in