These are a couple of examples that were taken from the first edition of the "Java in a Nutshell" book:
Examples from Autumn 1996: