Skip to content
JackSparrow414
Go back

Small Details to Remember in Everyday Development

Article body

  1. With try…catch, simply avoiding another throw is not enough. Remember to record the exception in the logs using a logger.

  2. When iterating over a map, entrySet is more efficient than keySet and gives access to both the key and the value. Look up examples if you need the exact usage.

  3. When searching a string with indexof, prefer single quotes—’ ‘—where possible; this is more efficient than double quotes.

JackSparrow414 Original post This post is licensed under CC BY-NC-SA 4.0

Share this post:

Previous Post
Everyday Development Pitfalls
Next Post
Java Development Details (Part 1)

Comments

Questions, corrections, and experiences are welcome. Sign in with GitHub to comment; both language versions share this discussion.

Comments are available on the live site only.