adding java example