JDBC is really not as straight-forward as you're expecting. The code needed to do what you're requesting depends on the location of your database, what kind of database you're running, the name of your database, and what fields you would like to insert.
Perhaps you should start with a JDBC tutorial? This looks like a good start:
http://www.javaskyline.com/learnjdbc.html.
Jon Emerson
Computer Scientist
Adobe Systems, Inc.