You can learn a lot by looking at the source for JBullet, a java port of the very popular Bullet physics engine. I don't know if your project is to write your own engine or you can use an existing one, but with either task you will learn a lot by studying JBullet.
Link: http://jbullet.advel.cz