Update java snippets