override method



I want to implement rmi and get this error

test/PatientGui.java [151:1] getEnToonData() in test.PatientGui cannot
override getEnToonData() in test.ViewModel; overridden method does not throw
java.rmi.RemoteException

Public class PatientGui
void getEnToonData() throws java.rmi.RemoteException
{
:
}

Public Class ViewModel

void getEnToonData()
{
System.out.println("Moet nog gemaakt worden in de sub-class");
}

If i remove the throws java.rmi.RemoteException, the compiler tells me it
should be thrown.

How can i solve this?
Thanks

Daniel


.



Relevant Pages

  • override eroor
    ... override getEnToonData() in test.ViewModel; ... Public class PatientGui ... void getEnToonData() throws java.rmi.RemoteException ...
    (comp.lang.java.help)
  • override problem
    ... override getEnToonData() in test.ViewModel; ... Public class PatientGui ... void getEnToonData() throws java.rmi.RemoteException ...
    (comp.lang.java.programmer)
  • Re: override problem
    ... override getEnToonData() in test.ViewModel; overridden method does not throw java.rmi.RemoteException ... void getEnToonData() throws java.rmi.RemoteException ... java.rmi.Remote, so if it's in the base class, it will have to be in the ... because the usual rule is that if an exception ...
    (comp.lang.java.programmer)