finish java example