I am confused about my project specifications and how to handle DuplicateKeyException. It is an exception thrown in the interface Sun supplied, as well as RecordNotFoundException.
public int create(String  data) throws DuplicateKeyException
The instructions read "Any unimplemented exceptions in this interface must all be created as member classes of the suncertify.db package.
I know I have to create a class for RecordNotFoundException but not sure if I also have to create a class for DuplicateKeyException as well. I suppose my confusion is because java does support an exception named DuplicateKeyException, but if I dont create a class in my project it wont complile.
Any unimplemented exceptions in this interface must all be created as member classes of the suncertify.db package
The DuplicateKeyException is not implemented in the JDK, you are referring to a class in the JEE. Because you are only allowed to use the JDK (no other jars or third party libraries), you won't find this class. If this class should refer to another one, your interface should have an import-statement (or whould use the fully qualified class name).
So yes, you have to create that exception and make sure you follow the instructions closely (which constructors do you have to provide, etc.).
 And I thought I was fast, but beaten by 2 other ranchers