Add sample code in javadoc