Hi all, I am working in RMI. In my server interface i have to throws RemoteException and my server class i need to throws DatabaseException so i got error message : overridden method doese not throw DatabaseException I'm wondering should i add DatabaseException into server interface
Hi lili, Overridden methods can't throws a wider spectrum of exception than overriding methods, so if you have a superclass (or interface) with a method (for example) void a() throws RemoteException; you can't make a subclass with the signature above: void a() throws RemoteException,DatabaseException; if the situation look like this, you must include DatabaseException inton the signature of the superclass (interface)method Hope it helps.