override method

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Daniel

    #1

    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.Remote Exception

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

    Public Class ViewModel

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

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

    How can i solve this?
    Thanks

    Daniel


Working...