More java snippets