Java sample code!