Snippet java code