Adding java code examples