Not so fast. Due to implicit type conversion inside conditional operator, the result of `map.higherKey(key)` first converted to `int`, and then back to `Integer`. If we make boxing and unboxing explicit, it will become the following:
Integer result = Integer.valueOf(
map.containsKey(key) ?
key :
map.higherKey(key).intValue());
Dodge the common mistakes that even senior developers make, take full advantage of static analysis tools, and deliver robust and error-free Java code.</b> Whenever you make a mistake writing Java, it’s almost guaranteed that someone else has made it before! In 100 Java Mistakes and How To Avoid Them</i> you’ll learn about the common and the not-so-common antipatterns, errors, and tricky bits that trip up almost every Java developer. Inside 100 Java Mistakes and How To Avoid Them</i> you will learn how to: Write better Java programs</li> Recognize common mistakes during programming</li> Create fewer bugs and save time for debugging and testing</li> Get help from static analyzers during programming</li> Configure static analysis tools to reduce the number of false reports</li> Extend static analysis tools with custom plugins</li> </ul> Each Java mistake in this handy guide comes with an illustrative code sample, an explanation of why the mistake occurs, and an actionable “ways to avoid this” section to help you dodge the error. Plus, you’ll benefit from useful static analysis sidebars that let you know when mistakes will—and won’t—be spotted by static analysis tools.
@KirillOsenkov @tagir_valeev @jonskeet @ericlippert thank you Kirill,
today I will start reading c# in depth 🤓
any chance do you know a site like javabubble.org for c# , just to find who to follow easily
1/5 #followfriday Guide to Mastodon for #dotnetmaui and #dotnet peeps. Firstly, if you're not on https://dotnet.social why not? 😂 Run by the awesome @styx31 if you want a cool handle (and cool place to hang out). 🙂 Next, if you haven't already, you want to go to https://fedifinder.glitch.me - it will export a CSV of the people you follow, which you then import into Mastodon and it finds whoever it can from that list and adds you as a follow to them. Also follow #dotnet and #dotnetmaui