Random java snippets