code snippets for my articles about java