Thanks to Rose India, and thanks to Deepak, for implementing Hibernate, in such a simple fashion. This program has really worked for me. And helped me to enhance it, for complex application. Thanks again.
If any of you, get problem in inserting data in to contact table.
Create contact table in the following way.
CREATE TABLE `Contact` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT , `firstName` VARCHAR( 50 ) NOT NULL , `lastName` VARCHAR( 250 ) NOT NULL , `email` VARCHAR( 100 ) NOT NULL , PRIMARY KEY ( `id` ) ) TYPE = MYISAM ;