Add Java sample code