adding java example
adding java example