The most copied StackOverflow Java code snippet contains a bug

Nine years later, developer corrects code snippet.

Article Link: https://www.zdnet.com/article/the-most-copied-stackoverflow-java-code-snippet-contains-a-bug/#ftag=RSSbaffb68