Added Java snippets.