Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

VMware Exam 2V0-72.22 Topic 9 Question 71 Discussion

Actual exam question for VMware's 2V0-72.22 exam
Question #: 71
Topic #: 9
[All 2V0-72.22 Questions]

Refer to the exhibit.

What is the id/name of the declared bean in this Java configuration class? (Choose the best answer.)

Show Suggested Answer Hide Answer
Suggested Answer: C

This is true because the id/name of a bean declared by the @Bean annotation is derived from the name of the method that returns the bean. In this case, the method name is clientService, so the bean name will be clientService as well. By default, Spring uses a lower-case first letter for bean names, unless explicitly specified otherwise by using the name attribute of the @Bean annotation. For example, we can use @Bean(name = ''ClientService'') to change the bean name to ClientService (starting with uppercase ''C'').


Contribute your Thoughts:

Loise
2 days ago
Ah, the age-old debate of whether to use camelCase or PascalCase for bean names. I say we settle this with a heated game of rock-paper-scissors.
upvoted 0 times
...
Willow
6 days ago
I agree with Cyril, the correct answer is clientServiceImpl.
upvoted 0 times
...
Bernardo
10 days ago
Hold up, are we sure this isn't a trick question? I mean, who knows, maybe the correct answer is 'BeanOfDoom' or something equally bizarre.
upvoted 0 times
...
Tamra
11 days ago
Hmm, this is a tricky one. I'm going to go with option C. It just feels more natural to me, you know?
upvoted 0 times
...
Adelina
16 days ago
I think option B is the right answer. The naming convention for beans is camelCase, so ClientServiceImpl is the way to go.
upvoted 0 times
Rasheeda
1 days ago
I think it should be clientServiceImpl with an uppercase 'C'.
upvoted 0 times
...
Svetlana
6 days ago
I agree, option B is correct. It should start with an uppercase letter.
upvoted 0 times
...
...
Cyril
23 days ago
But the convention is to start bean names with lowercase, so it should be clientServiceImpl.
upvoted 0 times
...
Johnetta
26 days ago
I disagree, I believe it is ClientService (starting with uppercase 'C').
upvoted 0 times
...
Daren
27 days ago
The answer is clearly option D. The name of the declared bean should start with an uppercase letter, so ClientService is the correct choice.
upvoted 0 times
Cecily
4 days ago
Yes, the bean name should start with an uppercase letter.
upvoted 0 times
...
Cecily
7 days ago
I agree, option D is the correct choice.
upvoted 0 times
...
...
Cyril
1 months ago
I think the id/name of the declared bean is clientServiceImpl (starting with lowercase 'c').
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77