There is some disagreement as to whether acronyms should be uppercase or have only their first letter capitalized. While some programmers still use uppercase, a strong argument can be made in favor of capitalizing only the first letter: even if multiple acronyms occur back-to-back, you can still tell where one word starts and the next word ends. Which class name would you rather see, HTTPURL or HttpUrl?
Glad to see that the 3rd edition has seen the light 😄! To elaborate on the reasoning, here's my note copied from the 2nd edition (https://www.goodreads.com/notes/22719418-effective-java/74-robert/4c2de9b9-b59f-44cb-8da7-1266ed8e18f9):
I believe the case for capitalizing just the first letter has strong justifications while the all-uppercase pattern does not.
Examples will use what an "HTTP SSL Request" class and variable might look like...
1. Overall simpler.
* CamelCase: Whether word, acronym, initialism, or abbreviation, capitalize just the first letter of it. For the variable, lowercase just the first letter.
* All-Uppercase: Rules are inevitably more complex (or the variable ends up being weird or inconsistent with the class name; see #3).
2. Consecutive acronyms/initialisms/abbreviations are distinguishable and readable.
CamelCase: HttpSslRequest
All Uppercase: HTTPSSLRequest (where does one acronym end and the next begin?)
3. The variable for a CamelCase class is easy and consistent: simply lowercase the first letter: httpSslRequest (only the first character varies from its class name). For the all-uppercase convention, all variable name options have a drawback:
* hTTPSSLRequest: simply lowercase the first letter (easy rule, but weird looking variable)
* httpSSLRequest: lowercase the first acronym, but not subsequent ones (strange rule; variable name inconsistent with class name)
* httpSslRequest: use camelcase for the variable (inconsistent convention between class name vs the variable name)
* httpsslRequest: lowercase acronyms, but not words (more complex rule; harder to distinguish between acronyms)
* httpsslrequest: lowercase the entire variable (harder to distinguish where one "word" ends and the next begins; greater variance with class name)
* http_ssl_request: use snake case for variables (inconsistent convention between class and variable names; more difficult to perform a 'find' on)