So basically leave the interface as it is, and then when you write the class that implaments it you could make the methods throw any additional exceptions you see neccessary.
Extend the DCAccess interface to include the RemoteException.
It shouldn't as long as you extend the interface, not implement it. But that is moot anyway. After more consideration, I am inclined to agree with James and use the adapter patter.
I think this will lead to a compiler error.
It works for me eventhough you have 2 classes implementing DBAccess
Originally posted by Nit Kad:
I sm going to start on my assignment for SCJD exam. I downloaded the jar from Sun which included one interface which is supposed to be implemented by another class called as Data.java .
My question is that can we make changes in the interface provided by Sun. The reason I am asking because the DBAccess interface is perfect for RMI except that it doesn't have RemoteException thrown in any of its methods which is a required exceptions if an interface is supposed to be used for RMI.
Please advice whether the interface can be modified to add the RemoteException or not?