nerdexam
Broadcom-VMware

2V0-72.22PSE · Question #71

2V0-72.22PSE Question #71: Real Exam Question with Answer & Explanation

The correct answer is A. Call LegacySingleton.getInstance() from within a @Bean method and return the instance.. See the full explanation below for the reasoning.

Question

Refer to the exhibit. How can a Spring Bean be created from this LegacySingleton class?

Exhibit

2V0-72.22PSE question #71 exhibit

Options

  • ACall LegacySingleton.getInstance() from within a @Bean method and return the instance.
  • BReturn an instance of LegacySingleton using the new keyword from a @Bean method.
  • CIt is not possible without modifying the LegacySingleton class, the constructor must be public.
  • DModify the LegacySingleton class by adding the @Autowired annotation to the instance variable.

Community Discussion

No community discussion yet for this question.

Full 2V0-72.22PSE Practice