Updating with more java code snippets