Add java snippets