add java snippets