(The java2 practical tutorial (3rd edition such as code) contains dozens of examples, which is the electronic version of all the programs in the practical tutorial (3rd edition such as code). Take a look at the example inside, it's quite classic~
java2 practical tutorial (3rd edition such as code).doc)