java snippets edited