small snippets of java