add some java snippets