Java example was malformed

Please use the proper formatting when editing the wiki. If you don't, all you do is mess up other people's work, and they won't like you. Also, don't just replace other people's code like that, even if you think your solution is better. Add it as an additional way to solve the problem, and then later people can compare them and decide whether to delete the old one. Thanks. --TimToady (talk) 15:36, 15 May 2013 (UTC)

Also don't simply copy content from other websites and paste it here, there are copyright issues. --Ledrug (talk) 15:50, 15 May 2013 (UTC)