New java snippets