update sample code to demonstrate how to call java method from native