extended java example